Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Getopt, regexen, and newlines

by JediWizard (Deacon)
on Oct 12, 2005 at 19:32 UTC ( #499651=note: print w/replies, xml ) Need Help??


in reply to Getopt, regexen, and newlines

Just a note:

$contents = do{local $/; <FILEHANDLE>;};

Should use less memory and (I believe) run faster than:

@contents = <FILEHANDLE>; $contents = join "", @contents;

P.S. see perlvar for info on $/


They say that time changes things, but you actually have to change them yourself.

—Andy Warhol

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2021-06-20 22:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (95 votes). Check out past polls.

    Notices?