foreach $line (<FH>) {Basically, this code tries to read all file content at once. That's what <> does when evaluated in list context. Try to read the file line by line. Saying,
is the same aswhile (<FH>) {
In code above, <FH> is evaluated in scalar context and the <> operator will return line by line until it reaches end of file. See perlop for more detail.while (defined($_ = <FH>)) {
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
In reply to Re: Out of memory!!??
by naikonta
in thread Out of memory!!??
by dramguy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |