Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Problem with HOA.

by GrandFather (Cardinal)
on Aug 28, 2006 at 07:13 UTC ( #569940=note: print w/ replies, xml ) Need Help??


in reply to Problem with HOA.

Update wrong answer. cog has it right.

use strict; use warnings; my %hash=( 1=> [1.5, 2.1, 3.1], 2=> [1.2, 2.2, 3.2], 3=> [1.3, 2.3, 3.3], ); my @array = sort {$a<=> $b} map {@{$hash{$_}}} keys %hash; print "@array";

Prints:

1.2 1.3 1.5 2.1 2.2 2.3 3.1 3.2 3.3

DWIM is Perl's answer to Gödel


Comment on Re: Problem with HOA.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2014-12-26 05:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (165 votes), past polls