in reply to Re^3: Escaping multiple escape chars
in thread Escaping multiple escape chars
versus:use Devel::Peek; my $txt = 'some\text'; print $txt; #prints some\text Dump($txt);
use Devel::Peek; my $txt = "some\text"; print $txt; #prints some [tab] ext Dump($txt);
Produces the exact same results as:use Devel::Peek; my $txt = '\|/'; $txt =~s/\\/\\\\/g; print $txt; Dump($txt);
Aren't they different literals? Change the ' to " and try the same test.use Devel::Peek; my $txt = '\\|/'; $txt =~s/\\/\\\\/g; print $txt; Dump($txt);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Escaping multiple escape chars
by ikegami (Patriarch) on Dec 10, 2005 at 14:22 UTC | |
by JamesNC (Chaplain) on Dec 10, 2005 at 16:29 UTC | |
by ikegami (Patriarch) on Dec 12, 2005 at 15:50 UTC | |
by JamesNC (Chaplain) on Dec 12, 2005 at 17:03 UTC |