Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Re: Why use <$fh> at all?

by BrowserUk (Patriarch)
on Oct 05, 2002 at 21:06 UTC ( [id://203085]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Why use <$fh> at all?
in thread Why use <$fh> at all?

Update: a typo and factual error. Mis-read my own benchmark.

As (was:if) you know your files are not too big to fit in memory and you really need the speed, the add this to your benchmark. It beats your code by 400%60%. Standard perl.

sub sub3 { open FILE, 'yourfile' or die $!; binmode FILE; my @lines = split $/, do{ local $/; <FILE>; }; close FILE or warn $!; }

Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-12-07 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (50 votes). Check out past polls.