Well, ... you can use gototo skip to the end of the routine:
sub f {
if ($v == 10) {
goto END;
}
END:
}
Or use lastto skip to the end of the routine (if you add a block):
sub f {
END: {
if ($v == 10) {
last END;
}
}
}
What you really want to use return
sub f {
if ($v == 10) {
return;
}
}
If you want to know what features are available, I would check the perlfunc page .
source
share