Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 exploiting the Monastery: (4)
As of 2014-11-22 17:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (123 votes), past polls