Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Welcome to the world of escaping! :)
If you have an end delimiter and you want to allow this end delimiter to appear literally you need to escape it, hence \' => ' But if you're escaping, you're also needing an escape character, which has also to be escaped when used literally, hence \\ => \ And thats it, nothing else needed within the single quotes family of q{} with a free choice of end delimiters. And now, if you think that perl sucks try emacs lisp, which only supports double quotes! In elisp regexes suffer from a ugly disease called slasheritis². Luckily you can use heredocs, because there is no delimiter that need to be escaped. And if you don't like the newlines then chomp:
I suppose you don't wanna put multiple path in a long heredoc? ¹ So why don't you use a character like / as placeholder?
Just don't blame Perl for M$ decision to use an escape character for separating paths. =) Cheers Rolf updatefixed code for s2b()
footnotes¹) you could read them into a hash defined by preceded hash keys.
==>
²) yes, it insults the eyes!!! In reply to Re: Single Quotes - how to avoid any escape processing?
by LanX
|
|