Dave Whipp pointed out that it would also be possible to write:
I think the leave where => caller(1) is the double return I was curious about.sub return_if_true ($value) { if $value { leave where => caller(1), value => $value; } } # and then just do: return_if_true(result_of_big_long_calculation(...));
In reply to Re: Double your return!!!!
by bsb
in thread Double your return!!!!
by bsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |