Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 avoiding work at the Monastery: (7)
As of 2016-12-06 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (112 votes). Check out past polls.