sub read_data { my %hash; while ( my $line = <> ) { chomp $line; # 3 Spalten in 3 Variablen my ( $errno, $text, $count ) = split m{\|}, $line, 3; # Zuordnung von Text zum Zaehler $hash{$text} = $count; } # liefere Hash mit Zuordnungen zurueck return %hash; }