if you wouldn't mind refactoring thatroutine, this works:
Ugly as hell but it appears to work.sub thatroutine(\$) { # do something to ${$_[0]} } sub thisroutine { return $_ if thatroutine local $_; ... my $namedvar; return $namedvar if thatroutine $namedvar; }
In reply to Re: looking for a good idiom: return this if this is true
by redlemon
in thread looking for a good idiom: return this if this is true
by merlyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |