Think about Loose Coupling | |
PerlMonks |
Re^4: string match using with an N in any positionby bart (Canon) |
on Nov 22, 2011 at 18:00 UTC ( [id://939508]=note: print w/replies, xml ) | Need Help?? |
Here's another idea: Regexp::Assemble is a module that can combine regexps — and possibly optimize the result. Granted, nowadays perl already optimizes large regexps, so it's not as useful any more as it once was.
Turning a glob pattern into a regexp isn't that hard: you can already get far by replacing every "?" with ".", "*" with ".*", and quotemeta everything else.
In Section
Seekers of Perl Wisdom
|
|