Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How do i sort a hash or array?

by gam3 (Curate)
on Jan 21, 2008 at 13:51 UTC ( #663375=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    %person = (
                 firstname => ['name1', 'name2', 'name3'],
                 lastname => ['lname1', 'lname2', 'lname3'],
                 city => ['city1','city2','city3']
              );
    
  2. or download this
    $person = {
                 firstname => ['name1', 'name2', 'name3'],
                 lastname => ['lname1', 'lname2', 'lname3'],
                 city => ['city1','city2','city3']
              };
    
  3. or download this
    %person = (
                 firstname => ['name2', 'name1', 'name3'],
    ...
               $person{lastname}[$_],
               $person{city}[$_]);
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://663375]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2018-07-18 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (383 votes). Check out past polls.

    Notices?