in reply to Out of memory!!??
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Out of memory!!??
by dramguy (Novice) on May 25, 2007 at 17:22 UTC |