# this sorts the %age hash by value instead of key # using an in-line function my @eldest = sort { $age{$b} <=> $age{$a} } keys %age;