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: {};
|
|---|