use warnings; use strict; my $res = []; while(my $line = ){ chomp $line; $line =~ /^(.*)\s+(\d{4})\s+(.*)$/; # Name in $1, Jahr in $2 my @meta = split /\s+/, $3; # splitte den Rest push @$res, [$1, $2, @meta]; } foreach my $r(@$res){ printf "Name: %s, Jahr: %u, Monat: %u \n", $r->[0], $r->[1], $r->[2]; } __END__ Name1 2005 5 112 165 198 287 814.7 910 Name2, W. 2005 4 127 162 193 279 314 430 Name3 Vorname 2006 8 110 192 282 314.3 870