in reply to Re^2: Escaping multiple escape chars
in thread Escaping multiple escape chars
Why would ' vs " make a difference? \\ is used as an escape character for both.
In single quote string literals, "\\" is interpreted as "\", "\'" is interpreted as "'", and everything else is left as is.
In double quoted string literals, "\\" is interpreted as "\", "\"" is interpreted as """, ...
Is there a way to make perl think the data came from a stream?
No. That makes no sense. The script doesn't know whether the data came from a stream or not. The conversion happens during the parsing of the script by the Perl parser. If it didn't do this, you would have no way of specifying certain strings, such as the one containing solely \.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Escaping multiple escape chars
by JamesNC (Chaplain) on Dec 10, 2005 at 06:56 UTC | |
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 |