Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Cheap idioms

by Juerd (Abbot)
on Oct 13, 2002 at 09:08 UTC ( #204874=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $contents = do { local (@ARGV, $/) = $filename; <> };
    
  2. or download this
    sub slurp {
        my ($filename) = @_;
    ...
        open my $fh, $filename or die "$filename: $!";
        return <$fh>
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://204874]
Approved by blakem
Front-paged by Revelation
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-08-02 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (55 votes), past polls