If you mean to stop it when $b == 3 (as that is when $ref[2] exists). Why not just stop looping at this point using last. Like so:$b = @ref; if ($b < 2) { ... }
As soon as this is evaluates as true, it will break out of the loop, which in this case is the while loop. If this is not what you wanted could you be a little more descriptive as to what it is that you want to accomplish (I am mainly guessing with my response).last if $b == 3;
-enlil
In reply to Re: Looper
by Enlil
in thread Looper
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |