while($line = <F>) { for my $hit ($line =~ /matchPattern/gi) { $ct++; push @files, $name; print "PAGE ->\t$name\ndata ->"; if( $line =~ /(patternOne)/i ) { print "\t\t$1\nMATCHED - >\t$hit\n"; } elsif( $line =~ /(patternTwo)/i ) { print "\t\t$1\nMATCHED - >\t$hit\n"; } else { print " TEXT INFO HERE.\n"; } } }
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Shorten script
by sauoq
in thread Shorten script
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |