[sf-perl] qr{} question

David Alban extasia at extasia.org
Tue May 26 12:46:55 PDT 2009

On Tue, May 26, 2009 at 12:41 PM, Ronald J Kimball
<rjk-perl-p5p at tamias.net> wrote:
> You should be able to work around this bug by escaping the # with a
> backslash.

yeah, i was thrown off by the man page, which indicates i don't need to. :-)

from perlre:

     The "#" character is also treated as a metacharacter introducing
     a comment, just as in ordinary Perl code.  This also means that
     if you want real whitespace or "#" characters in the pattern
     (outside a character class, where they are unaffected by "/x"), that
     you'll either have to escape them or encode them using octal or
     hex escapes.

specifically this part:

     outside a charactter class, where they are unaffected by "/x"


Live in a world of your own, but always welcome visitors.

More information about the SanFrancisco-pm mailing list