- or download this
%health = (
'John Kay' => [151,128],
'Sally Gi' => [174,145],
);
- or download this
while ( my ($patient,$levels) = each %health ) {
my @ascending = sort {$a <=> $b} @$levels;
...
my @descending = sort {$b <=> $a} @$levels;
print "$patient: @descending\n";
}
- or download this
John Kay: 128 151
Sally Gi: 145 174
John Kay: 151 128
Sally Gi: 174 145