Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: text sorting question

by Boogman (Scribe)
on Aug 03, 2000 at 00:51 UTC ( [id://25846]=note: print w/replies, xml ) Need Help??


in reply to text sorting question, kinda

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://25846]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 22:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found