Janek, et al -- ...and then Janek Schleicher said... % % Craig Hammer wrote at Wed, 29 May 2002 14:58:33 +0200: % ... % > @sorted = sort { $myhash{$b} <=> $myhash{a} } keys %myhash ; ... % % You want to sort decreasingly, from the highest to the lowest. ... % Make it more readable and write: % % @sorted = reverse sort { $myhash{$b} <=> $myhash{b} } keys %myhash;
I can only assume that you meant ... { $myhash{$a} <=> $myhash{$b} } ... since the test you wrote should always be equal ;-) Right? % % % Cheerio, % Janek TIA & HAND :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg25005/pgp00000.pgp
Description: PGP signature