in reply to Re: Re: Perl Matching Question
in thread Perl Matching Question
With this code if you put PASS sweeps FINAL on the same line, it fails. Also, you do not designate which words you've seen. As such, the file could say PASS on each line and the program will accept it. Too bad the files are so big as you could otherwise have one line inside your while ($file ... loop:
push @keepers, $file if $file=~/Something/ and -f $file and 3 == @{ [ +do { my @a= (my $temp = do{local(*ARGV,$/)=[$file];<>}) =~ /\b(PASS|s +weeps|Final)\b/g;my %b;undef @b{@a};keys %b } ] };
Yeah, no error checking or anything. :)
Anonymously yours
Anonymous Monk
|
|---|