in reply to text sorting question, kinda
This way, not only do you only use one array, but you don't even store All of the lines in it- it only stores the nonmatching lines.my @other_lines; while(<FILE>) { # whatever regex to strip out lines (/blahblah$/) ? print OUTFILE : push @other_lines, $_; } print OUTFILE @other_lines;
Alan
|
|---|