##
while ( my ($patient,$levels) = each %health ) {
my @ascending = sort {$a <=> $b} @$levels;
print "$patient: @ascending\n";
}
for my $patient ( keys %health ) {
my $levels = $health{$patient};
my @descending = sort {$b <=> $a} @$levels;
print "$patient: @descending\n";
}
####
John Kay: 128 151
Sally Gi: 145 174
John Kay: 151 128
Sally Gi: 174 145