Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Cheap idioms

by ignatz (Vicar)
on Oct 13, 2002 at 13:37 UTC ( #204896=note: print w/replies, xml ) Need Help??


in reply to Cheap idioms

For me this
my $contents = do { local (@ARGV, $/) = $filename; <> };
in production code is a real pain.

This, on the other hand

# Slurp file my $contents = do { local (@ARGV, $/) = $filename; <> };
is just fine.

Very cool, BTW.

ADDED: --/me for not noticing Aristotle's post saying the same thing.

()-()
 \"/
  `                                                     

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://204896]
help
Chatterbox?
[james28909]: /msg username message did it
[LanX]: James not /msg [beech] but /msg beech
[james28909]: i havent used the /msg [username] message</c> format
[LanX]: you can also click on beech and message him. ..
[james28909]: jebus
[LanX]: sorry again not [msg://beech]

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-05-24 22:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?