Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re (tilly) 3: More efficient munging if infile very large

by tilly (Archbishop)
on Jul 26, 2001 at 16:16 UTC ( [id://99953]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: More efficient munging if infile very large
in thread More efficient munging if infile very large

Change the foreach to a while.

The difference is that foreach puts the file read into list context so the entire file has to be held in memory. The while prints as it reads and so will work much better on large files.

Otherwise I like your changes.

  • Comment on Re (tilly) 3: More efficient munging if infile very large

Log In?
Username:
Password:

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

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

    No recent polls found