Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Cheap idioms

by Aristotle (Chancellor)
on Oct 13, 2002 at 11:13 UTC ( #204885=note: print w/ replies, xml ) Need Help??

in reply to Cheap idioms

I like the idiom. It took me a moment to grok what was happening with @ARGV, but now I've seen it I won't need to think again. However I'd still tack a comment on it (just a # slurp). The sub on the other hand is needlessly verbose. Why not take the middle road: sub slurp { local (@ARGV, $/) = shift; <> }

Now the sub's name is the comment, and its calls are self documenting.

Putting this in an Idiom::Common among with similar snippets would be nice. :)

Makeshifts last the longest.

Comment on Re: Cheap idioms
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2015-11-27 18:24 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls