or, if I suspected that the "SHEET" could point to a very big file,my @lines; chomp, push @lines, [split] for <SHEET>;
I personally believe that it wouldn't make a difference, unless you're already running Perl 6 since it has lazy evaluation by default; but in that case the syntax for the iterator would be completely different. Under Perl 5 you probably mean:
my @lines; chomp, push @lines, [split] while <$sheet>;
(This reply is intended mostly for the benefit of the OP which is also the reason why I incidentally changed the filehandle to a lexical variable which is what one should use in most cases nowadays.)
In reply to Re^5: Control Structure problem, mistake can't be found
by blazar
in thread Control Structure problem, mistake can't be found
by koolgirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |