in reply to Re: Perl regex question
in thread Perl regex question

It may be better to treat the words literally rather than as patterns:
my $joined_targets = join "|", map { quotemeta } @target_words;

Replies are listed 'Best First'.
Re^3: Perl regex question
by graff (Chancellor) on Mar 09, 2009 at 01:33 UTC
    As often as not, treating the strings as patterns is more sensible than treating them as literals. It depends on what the programmer wants to accomplish with a particular app, so the programmer should make this a deliberate choice for each app.