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.