[ph-perl] sorting hash values

Top Page
Author: Clemen Canaria
Date:  
To: ph-perl
Subject: [ph-perl] sorting hash values
hi guys,

suppose i have this kind of hash:

$VAR = {
          'record' => {
                        'rec001' => {
                                       'fname' => 'linus',
                                       'lname' => 'torvalds',
                                       'email' => 'linus@???',
                                     },
                        'rec002' => {
                                       'fname' => 'allan',
                                       'lname' => 'cox ',
                                       'email' => 'allancox@???',
                                     },
                        'rec003' => {
                                       'fname' => 'tigert',
                                       'lname' => '',
                                       'email' => 'tigert@???',
                                     },
                             }
                  };


how do i sort their fname's then display it using foreach or any other
loop? hope you could help me.

thanks and happy new year to everybody!

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Clemen Canaria
Web Developer, Systems Development and Testing
Information Services
ccanaria@???

Global Sources (NASDAQ: GSOL)
Creating and facilitating global trade
between buyers and suppliers
www.globalsources.com

15 Floor Citibank Center Bldg.,
Paseo de Roxas, Makati, Philippines
Tel: (63) 2 8942762
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


_______________________________________________
ph-perl mailing list
ph-perl@???
http://lists.q-linux.com/mailman/listinfo/ph-perl