Forum Moderators: phranque
#!/usr/bin/perl
print "Content-type:text/html\n\n";
$textToFind = "<form";
undef $\;
use File::Find;
find(\&processFiles, "/home/user/example.com/");
sub processFiles {
$filename= "$File::Find::name";
if ($filename =~/\.(html|txt|php|cgi|pl)$/) {
open (FILE, "<$filename");
$file = <FILE>;
close (FILE);
if ($file =~/\Q$textToFind\E/si) { print "$filename<BR>"; last;}
}
}