What if an element of @need was the nul string ("")? If you want to check if you've reached the end of the array, check if you've reached the end of the array.
last if $incr == @need;
In reply to Re^2: Why "use of uninitialized value" warning comes?
by ikegami
in thread Why "use of uninitialized value" warning comes?
by sanjay nayak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |