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
Give an example of using the -n and -p option.
How to replace perl array elements?
Perl regular expressions are greedy" what does this mean?
What is an interpolation in perl?
How do you you check the return code of a command in perl?
What are the advantages of programming in perl?
Show the use of sockets for the server and client side of a conversation?
what is the function that is used to identify how many characters are there in a string?
What does the qq{ } operator do?
What is 'commit' command in perl?
What are the various file operations in perl. Explain with example.
what are the strategies followed for multiple form interaction in cgi programs?
Write a cgi program to show the header part?
In Perl we can show the warnings using some options in order to reduce or avoid the errors. What are that options?
What does length(%HASH) produce if you have thirty-seven random keys in a newly created hash?