Think about Loose Coupling | |
PerlMonks |
Re: Filtering files with lists of substitution patternsby golux (Chaplain) |
on Aug 29, 2013 at 13:21 UTC ( [id://1051433]=note: print w/replies, xml ) | Need Help?? |
Hi LinuxMatt,
I'd suggest using qr to stringify each regex:
Which avoids the overhead of calling an extra subroutine for each line of every file. Then the apply_patterns subroutine would something like this:
Update: Modified apply_patterns to work with $_[0] directly.
In Section
Seekers of Perl Wisdom
|
|