in reply to How to disable Pattern Matching ?

Depends a little on your existing code, but /\Q$matchStr\E/ probably does what you want.

Update: You might like to consider index too.


Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^2: How to disable Pattern Matching ?
by sauoq (Abbot) on Sep 24, 2005 at 21:32 UTC
    You might like to consider index too.

    I wouldn't say "might" in this case. I'd say index() is exactly what the OP needs.

    -sauoq
    "My two cents aren't worth a dime.";