Scenario: A variable is mentioned in multiple file names and im able to grep once only. I want the file names in which the variable is mentioned whereas im able to grep only one file name.
sub module{ my $File1 = $File::Find::name; $File1 =~ s,/,\\,g; if ( $File1 =~ /.+\.doc/i) { open FILE, $File1 ; if ( grep /$variable/, <FILE> ) { $FOUND = 1; $FUN1 = $_; } close FILE; } } return 1;
Here $variable contains the search tag.. Any suggestions how to proceed Thanks
In reply to Multiple file handling by stallion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |