[VPM] sort array of anon hashes

Jer A jeremygwa at hotmail.com
Wed Oct 10 16:38:51 PDT 2007




hi all,


say I have an array of hashes pushed like so : push(@array, {key1 => 'test', string => 'this is a string', id => '1'});


how do i sort this alphabetically ascending or descending, by a specified key val, and still preserve the anonymous hash 

eg. after sorting, $array[$i]->{key1} and  $array[$i]->{string} should be both from the same anon hash entry in the array.


thanks in advance for all help.

-Jer A.



_________________________________________________________________
Send a smile, make someone laugh, have some fun! Start now!
http://www.freemessengeremoticons.ca/?icid=EMENCA122


More information about the Victoria-pm mailing list