Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: How to escape from sub to beginning of script?

by choroba (Chancellor)
on Mar 29, 2012 at 12:52 UTC ( #962378=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://962378]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2017-08-21 09:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (319 votes). Check out past polls.

    Notices?