#!/usr/bin/perl -w
######################################################################
# (c) Michael Schilli 1999
######################################################################

open(FIND, "find . -name '*.pl' -print |");
                      # Win32: "dir *.pl /s /b |"
while(<FIND>) {
    chop;
                      # Nur Dateien > 1000 Bytes untersuchen
    next if (stat($_))[7] <= 1000;
    next unless -f _; # Sparsamer stat()

                      # Datei öffnen und analysieren
    open(FILE, "<$_");
    print "$_\n" if grep(/pattern/, <FILE>);
    close(FILE);
}

close(FIND);
