Hi, 

Newbie here...I'm trying to find the string "Take our survey" in all the files that 
match this pattern, traversing multiple directories. When I run it I get no filenames. 
I'm positive the string exists. Any ideas as to what I'm doing wrong.

Thanks for any help, Pam

Here's what I've got.....

#!/usr/bin/perl
#process all files in directory www/htdocs

use File::Find;
@ARGV = qw(/dept/unxmkt/www/htdocs) unless @ARGV;
find(\&find_it, @ARGV);
 
   sub find_it{
       foreach $_(@ARGV){
             while (<>){
                   if ($_=~ /Take our survey/){
                         print ("$_\n");
                   } 
             } 
       }
 
  } #end find_it


 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to