Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
[Tanktalus]: What's so happy about it? :P
[Tanktalus]: ww: your parens don't line up. Sure, perl can look like line noise, but the parens still have to line up. ;)
[Tux]: 1nickt did you build 5.24.3, 5.26.1, and 5.27.4 yet?
Tux now has 284 working versions of perl
[1nickt]: Tux oh yes, have filed reports from them already :-)
1nickt has 44 for one version of one OS ...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-09-25 16:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (282 votes). Check out past polls.

    Notices?