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

RE: Load file into a scalar without File::Slurp

by turnstep (Parson)
on Jul 17, 2000 at 04:23 UTC ( #22800=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    {
      local $/;
      $/ .= $_ while <STDIN>;
    }
    
  2. or download this
    {
      local $/; ## This is already undef, no need to set it
      ## Read in the file, etc...
    }
    ## $/ is now back where it was
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-07-30 21:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (241 votes), past polls