in reply to Re: Re: Array sort - kind of...
in thread Array sort - kind of...
Thus
becomesmy $min_i = 0; foreach my $i (1..$#array) { $min_i = $i if $array[$i]->[2] < $array[$min_i]->[2]; }
But I'm so sure its easier to understand...my $index=0; $array[$_][2]<$array[$index][2] && ($index=$_) foreach 1..$#array;
;-)
Yves / DeMerphq
--
When to use Prototypes?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Array sort - kind of...
by petral (Curate) on Feb 04, 2002 at 20:47 UTC | |
by demerphq (Chancellor) on Feb 05, 2002 at 10:25 UTC |