use strict; use warnings; use Data::Dumper; # da kommen die Daten hin my $data = []; # Daten einlesen while(){ # DATA means Handle my %line = (); @line{qw(lfdnr dev date time nr1 nr2 nr3 xnr well lastnr)} = unpack 'A9 A4 A11 A9 A7 A7 A13 A13 A17 A11', $_; push @$data, \%line; } print Dumper $data; __DATA__ 3434 OUT 2014-04-08 07:17:43 16 25 3338762777 X unknown 615860 3434 OUT 2014-04-08 07:38:14 200 209 3338762777 X unknown 615860 3851 OUT 2014-04-08 10:11:22 104 118 3338768047 3338768047 unknown 3116 3851 OUT 2014-04-08 10:44:01 37 46 3338768047 3338359382 unknown 03094519504 3851 OUT 2014-04-08 11:46:40 53 85 3338768047 3338768047 unknown 765900 3851 OUT 2014-04-08 13:10:22 40 85 3338768047 3338768047 unknown 0309443582 3935 OUT 2014-04-08 08:33:48 8 21 3338757522 3338757522 unknown 459687 3965 OUT 2014-04-08 08:13:34 34 61 3338700192 3338700192 unknown 703553