in reply to
Escaping metacharacters
Do
$a =~ s/(\W)/\\\1/g; # or $a =~ s/(\W)/\\$1/g;
[download]
before your "if" line.
I'd test this but I've lost track of my Perl4 executable.
I redownloaded perl4 and both of those work for me (if you also drop the \Q and \E that I forgot to mention). -
tye
Comment on
(tye)Re: Escaping metacharacters
Download
Code
Replies are listed 'Best First'.
Re: (tye)Re: Escaping metacharacters
by
nosduh
(Initiate)
on Dec 17, 2002 at 20:06 UTC
Thanks. I knew I could modify the var but I wanted to do it without the extra step. Maybe it's not possible in perl4.
[reply]
In Section
Seekers of Perl Wisdom