print testing(); sub testing { return $_ if $_ = rval0(); return $_ if $_ = rval1(); } sub rval1 { return 1; } sub rval0 { return 0; }
In reply to Re: looking for a good idiom: return this if this is true
by TedPride
in thread looking for a good idiom: return this if this is true
by merlyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |