for (<>) { chomp; /(\d+)\s+(\d+)/ or next; $total{$1} += $2; } for (sort { <=> } keys %total) { print "$_ = $total{$_}\n"; }
-- Joost downtime n. The period during which a system is error-free and immune from user input.
In reply to Re: Stressed
by Joost
in thread adding numbers from a file (was: Stressed)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |