goto $EXP
with $EXP = "label-name"
so
sub retn { goto $EXP }
would do if you've set a global $EXP before.
Please note that you can't goto into a sub or a foreach loop, so returning there is not possible.
BUT in 99.9% of all cases there are far better solutions than that ...
... maybe you just need to try a continue block?
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: how to return from a goto ?
by LanX
in thread how to return from a goto ?
by perl_boy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |