Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Looping Over Hash Skips an Element?

by toolic (Bishop)
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 surveying the Monastery: (8)
As of 2015-07-02 01:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls