Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How can one find five max values and five min values with positions in descending and ascending order from arrays?

by davido (Cardinal)
on Apr 26, 2013 at 05:53 UTC ( [id://1030766]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;   
    ...
      my @indices = @_;
      print "\t$x[$_] => $y[$_] at position $_\n" for @indices;
    }
    
  2. or download this
    The five highest valued names:
        k => 9 at position 4
    ...
        c => 4 at position 0
        e => 5 at position 2
        d => 6 at position 1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1030766]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-03-19 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found