in reply to min and mindex
Y'all are messing with my PerlMonks drinking game: No one said Schwartzian transform, e.g.,
#!/usr/bin/env perl use Modern::Perl; my ($c, $d, $i) = ([qw(7 5 3 0 9 18 12)], [qw(a b c d e f g)], 0); say $d->[[(sort {$a->[0]<=>$b->[0]} map {[$_,$i++]} @{$c})]->[0][1]];
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: min and mindex
by kcott (Archbishop) on Nov 09, 2012 at 06:13 UTC | |
by jaredor (Priest) on Nov 10, 2012 at 03:02 UTC |
In Section
Seekers of Perl Wisdom