About as quickly as I thought of this, I remembered a best practice that says something like "do not use exceptions for control flow". I was about to retract my suggesttion, but figured I would ask the other monks. Is the consensus among the monks that using eval/die like this is bad? I suppose it depends on the true nature of the SOMETHING and SOMETHING_ELSE cases.eval { while(CONDITION) { die if SOMETHING; die if SOMETHING_ELSE; ... } }; if(not $EVAL_ERROR) { # loop finished on it's own accord }
In reply to Re: while loop question
by polymorpheus
in thread while loop question
by Freezer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |