use List::MoreUtils qw(natatime); my $it = natatime(9, (keys %ifSpeeds)); while (my @vals = $it->()) { print "@vals\n"; }