develooper Front page | perl.beginners | Postings from February 2002

sort on anonymous array elements as hash values

Thread Next
From:
birgit kellner
Date:
February 6, 2002 08:40
Subject:
sort on anonymous array elements as hash values
Message ID:
118544427.1013016944@[10.0.0.140]
my %hash = (
	'keyone' => ['firstvalueone', 'firstvaluetwo],
	'secondkey' => ['anothervalueone', 'valuetwoforsecondkey'],
	'keythree' => ['thirdvalueone', 'thirdvaluetwo']
	
);

Can I sort the hash on the second element of the anonymous array?

Output should be:

firstvaluetwo
thirdvaluetwo
valuetwoforsecondkey


Many thanks in advance,


Birgit Kellner

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About