Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by audreyt (Hermit)
on Jul 25, 2000 at 01:25 UTC ( [id://24191]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $contents=slurp('foobar');
    sub slurp {local$/=<>if local@ARGV=@_}
    
  2. or download this
     
    {local$/;$contents=<>if local@ARGV='foobar'};
    
  3. or download this
     
    $contents=join'',<_>if open _,'foobar';
    
  4. or download this
    $contents=`cat foobar`
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-19 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found