You will get stuck in an endless loop with that one if the match is not in the array. I'm sure you meant:
my $idx=0; $idx++ while $array[$idx] ne 'entry' && $idx < $#array; die 'Entry not found' if $idx == $#array and $array[-1] ne 'entry';
In reply to Re: Re: Array location?
by cees
in thread Array location?
by MrMadScience
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |