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 splicing of arrays?
Which has highest precedence in between list and terms? Explain?
Does Perl have objects? If yes, then does it force you to use objects? If no, then why?
What are the options that can be used to avoid logic errors in perl?
What is cpan in perl?
What does a die() function do in perl?
What is -> symbol in perl?
How the interpreter is used in Perl?
What is the difference between single (') and double (") quote in a string in perl?
How to read a single line from a file in perl?
Give an example of the -i and 0s option usage.
How do I generate a list of all .html files in a directory?
Explain what is perl language?
Why we use CGI?
Explain socket programming in perl?