my $pattern = shift(@ARGV); my $re = qr/$pattern/; FILE: foreach my $filename (@ARGV) { open(my $fh, '<', $filename) or do { warn("Unable to open $filename: $!\n"); next; }; while (<$fh>) { next FILE if /$re/; } print("$filename\n"); }
Updated
In reply to Re: I need "Antigrep"
by ikegami
in thread I need "Antigrep"
by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |