Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: min and mindex

by tinita (Parson)
on Nov 07, 2012 at 00:03 UTC ( #1002606=note: print w/replies, xml ) Need Help??


in reply to min and mindex

use List::Util qw/ reduce /; my $min_index = reduce { $array1[$a] <= $array1[$b] ? $a : $b } 0 .. $ +#array1; say <<"EOM"; min element: $array1[ $min_index ] min index: $min_index array2: $array2[ $min_index ] EOM

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002606]
help
Chatterbox?
[Discipulus]: why github use 'pull request' instead of 'push request'? where is the subject?
[Discipulus]: I'm the subject or is the program? i think i always am the subject
[erix]: it an invite to pull, as I understand it
[Discipulus]: Concave or convex?
[Discipulus]: who make the invitation? the program?!?
[choroba]: it's historical
[erix]: pull requests
[choroba]: originally, you sent a pull request to someone by email, i.e. you asked them to pull from your repo
[Discipulus]: if is the author of a patch, is more like a 'request to push' into rather than a pull request..
[choroba]: as it's considered unpolite to push to someone else's repo

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2017-05-27 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?