in reply to Re^2: looking for a good idiom: return this if this is true
in thread looking for a good idiom: return this if this is true
retrun thatroutine() if thatroutine()That calls thatroutine() twice, which will perform things twice. Not good.
if (thatroutine()) {return $_}$_ isn't getting set there. Are you expecting the variable to be psychic?
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: looking for a good idiom: return this if this is true
by wolfger (Deacon) on Mar 07, 2005 at 17:54 UTC | |
by merlyn (Sage) on Mar 07, 2005 at 19:25 UTC |