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
Explain perl. When do you use perl for programming? What are the advantages of programming in perl?
What does undef function in perl?
what is Perl one liner?
What are the advantages of c over Perl?
What is a perl references?
You want to add two arrays together. How would you do that?
What is the purpose of goto expr statement?
Write an example explaining the use of symbol tables.
Perl regular expressions are greedy" what does this mean?
Assuming both a local($var) and a my($var) exist, what's the difference between ${var} and ${"var"}?
Can you add two arrays together?
What is the use of "stderr()"?
Explain the difference between die and exit in perl?
How to read a file into a hash array?
You want to read command-line arguements with perl. How would you do that?