in reply to adding numbers from a file (was: Stressed)
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Stressed
by Anonymous Monk on May 10, 2002 at 19:06 UTC |