Hi, Just trying to understand hash of hash of array.

my %LIS; my $pet='dog';my $x='fido'; my $y=5; my $z='male';
$LIS{$pet}{$x} = [$y,$z];
print "@{$LIS{$pet}{$x}}"; # ok, prints '5 male'

Now, suppose %LIS is populated with lots of pets.
How to get a list of the $z sorted on $y for the dogs ?

my @LIS = sort { ????? }@{$LIS{'dog'}{$x}}; ???

Thanks

Reply via email to