my @sorted = sort { $hash{$a}->{employee_number}->{years_employed} <=> $hash{$b}->{employee_number}->{years_employed} } keys %hash;