in reply to Array location?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Array location?
by cees (Curate) on Jul 08, 2003 at 21:15 UTC | |
by BrowserUk (Patriarch) on Jul 08, 2003 at 21:28 UTC |