in reply to Breaking out of an 'if'
if ($some_condition) { some_stuff(); if (!$some_condition2) { some_more_stuff(); } }
or
if ($some_condition) { some_stuff(); } if ($some_condition && !$some_condition2) { some_more_stuff(); }
or
IF: { if (some_condition) { some_stuff(); last IF if $some_condition2; some_more_stuff(); } }
btw, don't use & on function calls unless you must. It causes Perl to behave differently if the function has a prototype.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Breaking out of an 'if'
by jpfarmer (Pilgrim) on Apr 14, 2005 at 19:42 UTC | |
by ikegami (Patriarch) on Apr 14, 2005 at 19:55 UTC |