Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Getopt, regexen, and newlines

by JediWizard (Deacon)
on Oct 12, 2005 at 19:32 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://499651]
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-04-25 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found