A gazillion ways:). Here's one
my $idx=0; $idx++ while $array[$idx] ne 'entry' and $idx < $#array; # Added! See [272470]. [cees]++ die 'Entry not found' if $idx == $#array and $array[-1] ne 'entry'; ## $array[$idx] is (the first!!) matching entry.
In reply to Re: Array location?
by BrowserUk
in thread Array location?
by MrMadScience
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |