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

Re^3: Interchanging hash values (single pass - or not)

by Aristotle (Chancellor)
on Apr 21, 2003 at 11:39 UTC ( [id://251976]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($min, $max) = (scalar each %h) x 2;
    ($min, $max) = (
    ...
        $h{$_} > $h{$max} ? ($min, $_) :
        ($min, $max)
    ) for keys %h;
    
  2. or download this
    my $min = each %h;
    my $max = each %h;
    ...
    else {
        $max = $min;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-24 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found