You can also use the quotemeta function to escape magic punctuation characters.
my $safe = quotemeta($str);If $str contained a backslash, it would be escaped correctly.
• another intruder with the mooring in the heart of the Perl
In reply to Re: quote a \
by grinder
in thread quote a \
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |