\ is special to all forms of quoting in Perl except for single-quoted here-docs. If you want two \'s in Perl then you need to put in four \'s:
Note that I tend to use the last version because I find that it discourages me from getting confused into thinking that \ isn't special inside of single quotes and so I'm less likely to run into the problem you just did. (: - tye (but my friends call me "Tye")print '\\decs17\dq'; # prints \decs17\dq print '\\\\decs17\dq'; # prints \\decs17\dq print '\\\\decs17\\dq'; # also prints \\decs17\dq
In reply to (tye)Re: string interpolation in RE
by tye
in thread string interpolation in RE
by asinghvi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |