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