You probably need "while (my $line = <$fh>){" instead of "while (my $line = $fh){".
Try to use "print" statements to show you contents of variables, so you know what your script is doing, then you can find such bugs yourself (there are also advanced methods for bug finding available, but everyone usually begins learning that by printing debug output to find bugs).
In reply to Re: Out of Memory in Perl
by jethro
in thread Out of Memory in Perl
by maheshkumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |