Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 contemplating the Monastery: (9)
As of 2014-12-25 21:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls