Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How can I get the four highest valued letters in an array?

by tybalt89 (Monsignor)
on Jun 01, 2017 at 16:02 UTC ( [id://1191865]=note: print w/replies, xml ) Need Help??


in reply to How can I get the four highest valued letters in an array?

And now for something completely different...

#!/usr/bin/perl # http://perlmonks.org/?node_id=1191833 use strict; use warnings; my @x=qw/d b c e a f/; my @y=qw/4 6 5 2 9 1/; my @answer; @answer[@y] = @x; @answer = (grep defined, reverse @answer)[0..3]; print "@answer\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-23 17:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found