Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 rifling through the Monastery: (7)
As of 2015-07-04 16:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls