Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: What makes an array sorted and a hash unsorted?

by shmem (Chancellor)
on Jun 02, 2009 at 09:44 UTC ( [id://767527]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @ary = (34, 'a', '+', \0, 'y','Z');
    
  2. or download this
    @ary = sort { $b cmp $a } @ary;
    
  3. or download this
     @h{(a..z)} = (A..Z);
    %h = map { $_ => $h{$_} } sort { $b cmp $a } keys %h;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-19 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found