> @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]

Reply via email to