For more general advice on how to refactor code like that, read Higher-Order Perl.
particularly Chapter 5: From Recursion to Iterators
In reply to Re^2: Better way to write these checks?
by Anonymous Monk
in thread Better way to write these checks?
by Ransom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |