in reply to Double your return!!!!
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(...));
|
|---|