#!/usr/bin/perl use strict; use warnings; my %summen = (); while (my $zeile = ) { chomp($zeile); my @spalten = split (/\t/,$zeile); $summen{$_+1} += $spalten[$_] for 0..$#spalten; } print "Summen:\n"; print "$_: $summen{$_}\n" for sort keys %summen; 1; __DATA__ 1234 1 3 4 99.3 8 9.22 234 1 3 4 99.3 8 9.22 34 1 3 4 99.3 8 9.22 4 1 3 4 99.3 8 9.22 4 1 3 4 99.3 8 9.22