in reply to Re^2: How to escape from sub to beginning of script?
in thread How to escape from sub to beginning of script?

OK, so add exit to other options :-)

Or, use a different variable, e.g. $restart, and set it to 1 only if you want to restart the loop. The loop then becomes

$restart = 1; while ($restart) { $restart = 0; .... }
Or whatever similar.