in reply to text sorting question, kinda
The first way that comes to mind offhand would be to do
something like
This would work well provided that the file doesn't get too big, as the entire thing is going to have to be kept in memory. But, if it's about 200k as you say, that should work fine.my @top_lines; my @other_lines; while(<FILE>) { # whatever regex to strip out lines (/blahblah$/) ? push @top_lines, $_ : push @other_lines, $_; } print OUTFILE @top_lines; print OUTFILE @other_lines;
In Section
Seekers of Perl Wisdom