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

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.


Comment on Re: Cheap idioms
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (21)
As of 2015-07-31 17:46 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (279 votes), past polls