Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Looping Over Hash Skips an Element?

by toolic (Chancellor)
on Jan 06, 2012 at 18:29 UTC ( #946642=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Looping Over Hash Skips an Element?
in thread Looping Over Hash Skips an Element?

How about:

use List::MoreUtils qw(natatime); use List::Util qw(sum); use Data::Dumper; my @sums; my $it = natatime(8, (values %ifSpeeds)); while (my @vals = $it->()) { push @sums, sum(@vals); } print Dumper(\@sums); __END__ $VAR1 = [ '6200000000', '6200000000', '6200000000', '2600000000' ];


Comment on Re^3: Looping Over Hash Skips an Element?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://946642]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2014-09-21 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls