in reply to Re^2: part - split up files according to column value
in thread part - split up files according to column value

Statements end with semicolons. Blocks do not:

} push @{ $lines{$key}}, $_; push @{ $totals{$key}}, $sub_total; }

You also have a problem in that you instantiate $sub_total with a value of zero every time through the loop, right before you add a value to it, so it will always equal that value. This is probably not what you want. You should move the my line that creates it to before your loop, so it can accumulate inside the loop.

Aaron B.
Available for small or large Perl jobs; see my home node.