http://www.perlmonks.org?node_id=1003072


in reply to Re: min and mindex
in thread min and mindex

++ I like your thinking, jaredor!

So, what's the rules of this drinking game? No doubt I lost points when I failed to utter the incantantion "Schwartzian transform" while coding:

my $min_pos = ( sort { $a->[0] <=> $b->[0] } map { [$_ => ++$pos] } @array1 )[0]; # do useful stuff print ... $array2[$min_pos->[1]]

OK, I've downed a large Scotch. Your turn. :-)

-- Ken