in reply to How to print the 10 most recent (epoch) keys in a hash when epoch is not the key

Sort::Key::Top does it:
use Sort::Key::Top qw(rukeytop); # ru => means reverse order and sorting keys are unsigned integers my @recent = rukeytop { $out_hash{$_}{EPOCH} } 10 => keys %out_hash;
  • Comment on Re: How to print the 10 most recent (epoch) keys in a hash when epoch is not the key
  • Download Code