You're reading the complete file into memory before doing anything. If your program logic allows for this, it's easy to rewrite it by processing the file line-by-line. Change:
foreach my $line (<$readHandle>) {
to
while (defined( my $line= <$readHandle>)) {
In reply to Re: How to read in large files
by Corion
in thread How to read in large files
by Only1KW
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |