⭐ in reply to How do I find the index of a specific array value?
my @a = ( 1 .. 1_000_000 ); # some large array my $want = 5843; my $index = 0; ++$index until $a[$index] == $want or $index > $#a;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: how do i find the index of a specific array value?
by hdp (Beadle) on Apr 26, 2001 at 08:49 UTC |