There's more than one way to do things | |
PerlMonks |
Re: looking for a good idiom: return this if this is trueby mr_mischief (Monsignor) |
on Mar 11, 2005 at 07:41 UTC ( [id://438561]=note: print w/replies, xml ) | Need Help?? |
Probably not the "best", but I have one that make somewhat clever use of its placement in a subroutine to work in one line without creating a lexical. I'll put here the whole test program.
Maybe useful if you're looking for some obfuscation. It works with unshift/shift as well, of course. Christopher E. Stith
In Section
Seekers of Perl Wisdom
|
|