Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Increasing Buffer size of STDIN on PERL Program

by BazB (Priest)
on Sep 10, 2003 at 21:44 UTC ( [id://290541]=note: print w/replies, xml ) Need Help??


in reply to Re: Increasing Buffer size of STDIN on PERL Program
in thread Increasing Buffer size of STDIN on PERL Program

This is only advisable if the input data will fit into the available memory without compromising other processes at the same time.
You don't want the system to start paging heavily or exhaust memory just for the sake of having all data in memory at once.

Slurping files can sometimes be advantageous.
Other times using read() or sysread() to read large blocks of data might do the trick.
Personally I still find myself using a simple  while (<FH>){...} for most jobs, from logfiles to multi-gigabyte datasets.

Cheers,

BazB


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.

Log In?
Username:
Password:

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

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

    No recent polls found