in reply to matching the + character
In a double quoted string, '\+' will be interpreted as a character escape. Since '\+' doesn't actually have any special character escape meaning, it is interpreted as simply '+'. If you want to pass 'a\+b' to the regex, you'll have to use a second slash to escape the first and prevent any attempt at character escape interpretation gobbling up the '\'.
|
---|
In Section
Seekers of Perl Wisdom