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: {};
In reply to Re: Breaking out of an 'if'
by jhourcle
in thread Breaking out of an 'if'
by jpfarmer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |