Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
"be consistent"
 
PerlMonks  

Re: Breaking out of an 'if'

by jhourcle (Prior)
on Apr 14, 2005 at 18:53 UTC ( [id://448006]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Breaking out of an 'if'

Two more options for you, depending on how much external info you need to make use of:

somefunction() if $some_condition; sub somefunction { &some_stuff(); return if $condition; &some_more_stuff(); }

Or, the one that I'll probably get flamed for:

if ($some_condition){ &some_stuff(); goto EXIT if $condition; &some_more_stuff(); } EXIT: {};

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://448006]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.