We don't bite newbies here... much | |
PerlMonks |
Re: text sorting questionby Boogman (Scribe) |
on Aug 03, 2000 at 00:51 UTC ( [id://25846]=note: print w/replies, xml ) | Need Help?? |
If you don't want to be saving any of the elements in arrays
or anything like that, you could always just make two runs
through the file. The first would check for the 'blah blah' lines
and write those to a temporary file. The second would append
the remaining lines to the end. Sure it means you have to read
through the file twice, but if you're worried about memory usage,
this only holds on to one line at a time.
In Section
Seekers of Perl Wisdom
|
|