foreach $i (@a) { chomp($i); # chomp the trailing newline, It shows the linenumber if ($i =~ /Geburtuhrzeit [0-9].[0-9]/) { my (undef, $year, $month, $day) = split(/\s|\.|\//, $i); if (($year == 2010) && ($month == 07) && ($day ==31)) { chomp($i); print "$i\n"; print "$.\n"; print "Find Geburtuhrzeit with fixed date line $. \n"; #bis hierhin hat es funktioniert, dann geht er nicht in die Forschleife warum?? foreach $u (1 .. $#b) # foreach (startwert..... $#array) { if ($i eq "") { # Search for empty line next; print "Find empty line $. \n"; push ($h{$b[0]},($b[$u])); # push (ARRAY, newLIST)# Klappt nicht! } } }