in reply to Re: File handles in regular expressions
in thread File handles in regular expressions
Hi. Did you choose to use Tie::File instead of just reading file1.txt into an array so that very large files could be handled? If so there is a problem with concatenating all the output into a scalar. $matched_lines could end up holding the whole huge file. One possible solution is to replace $matched_lines .= $match.$/; with print $fh $match.$/; Just print incrementally.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: File handles in regular expressions
by 2teez (Vicar) on Oct 18, 2012 at 23:55 UTC | |
by Lotus1 (Vicar) on Oct 19, 2012 at 02:16 UTC |