in reply to Regex - Delimiter question

See perlop under 'Gory details of parsing quoted constructs' -> 'Removal of backslashes before delimiters'

With the '.' being the delimiter, the backslash before the dot is removed before the regex parser sees the expression. So your code is equivalent to s/.// which explains your result.

-- Hofmator

Code written by Hofmator and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.