in reply to Re^2: Quick easy question: What does $i mean?
in thread Quick easy question: What does $i mean?
Is "better" written:for (my $i = 0; $i < $#array + 1; ++$i){ print $array[$i] . "\n"; }
Of course, if the output needs the array index in it, that changes things...foreach my $s ( @array ){ print "$s\n"; } # OR one of many other ways like: print $_."\n" for @array;
|
|---|