in reply to Re: Escaping the escaping escape character
in thread Escaping the escaping escape character
One thing you have to remember though is that if you're assigning \ to a string that it does interpolate in single quotes. Eg:
This can sometimes be confusing, because:# uninterpolated string my $string = '\\\\ double escape \single escape'; # print it print "$string\n"; # outputs - "\\ double escape \single escape" # do your replace $string =~ s/\\/\\\\/g; # print it again print "$string\n"; # output is '\\\\ double escape \\single escape'
are equivalent.$string = '\hello'; # and $string = '\\hello';
Ow, my head hurts...
cLive ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Escaping the escaping escape character
by CiceroLove (Monk) on Jun 25, 2001 at 02:16 UTC |