in reply to looking for a good idiom: return this if this is true
print testing(); sub testing { return $_ if $_ = rval0(); return $_ if $_ = rval1(); } sub rval1 { return 1; } sub rval0 { return 0; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: looking for a good idiom: return this if this is true
by merlyn (Sage) on Mar 05, 2005 at 19:41 UTC |