> @hosts = ( list of hashes like below ... ); > %hosts = ( name => "hostname", > ipaddr => "www.xxx.yyy.zzz", > location => "location" > ); > > How can produce a sorted list of the hashes based on the hostname and then > access each hash to print the details. > @hosts = sort { %{$a}->{'name'} <=> %{$b}->{'name'} } @hosts; for (@hosts) { my $hash = %{$_}; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
- Array of Hashes? Batchelor, Jonathan
- Re: Array of Hashes? register
- Re: Array of Hashes? Pete Sergeant
- Re: Array of Hashes? Richard J. Barbalace
- Re: Array of Hashes? Jeff 'japhy/Marillion' Pinyan