in reply to Out of memory error!!!
Change "foreach $line2 ( <INFO> ) {..."
to
"while( my $line2 = <INFO> ) {..."
Your current implementation slurps the flat file into memory because foreach is a ranged-based loop that evaluates <INFO> in list context, which gives you slurp behavior. while() is a conditional based loop, and thus evaluates <INFO> in scalar context, which gives you its iterator behavior.
Dave
|
|---|