my @array=('data1','data2');
my @array1=('data1','data2');
my ($i,$k);
$i=7;
$k=7;
while($i){
$array [++$#array] = 'ree';
$i--;
print "@array";
}
while($k){
push(@array1,'ree');
$k--;
print "@array1";
}
Are these two while loop are doing the same functionality ?
What may be the difference?
Answer Posted / neo
Both are same
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How does a “grep” function perform?
There are some duplicate entries in an array and you want to remove them. How would you do that?
Explain chomp, chop, cpan, tk.
When do you use perl programming?
What is posix in perl?
Explain grooving and shortening of arrays?
How will you declare a variable in perl?
What is the syntax used in Perl grep function?
What is qq (double q)operator in perl?
How to turn on Perl warnings? Why is that important?
Explain lists ?
Does Perl have objects? If yes, then does it force you to use objects? If no, then why?
List all the features of perl programming?
How to read a single line from a file in perl?
Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.