Probably you want to combine Regexp::Assemble with inplace edit and do something like:
use Regexp::Assemble; my $ra = Regexp::Assemble->new; $ra->add ($_) for @matchArray; my $re = $ra->re; @ARGV = ('filename'); $^I = '.bak'; while (<>) { print if m/$re/; }
In reply to Re: Usage of grep on a file
by GrandFather
in thread Usage of grep on a file
by tsk1979
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |