#!/usr/bin/perl $suche = "nummer"; @list = ""; foreach $file (glob("*.txt")) { open(READ,"$file") || "Fehler beim oeffnen"; push (@list,); close(READ); } $count = ""; foreach $movie ("@list") { $count++; if ($movie=~ /$suche/i) { print "Gefunden : ","@list[$count]"; } else { print "Nix gefunden"; } }