There's more than one way to do things | |
PerlMonks |
Re^2: Having to manually escape quote character in args to "system"?by vr (Curate) |
on Sep 13, 2017 at 11:26 UTC ( [id://1199289]=note: print w/replies, xml ) | Need Help?? |
Thank you, everyone, for very enlightening answers, I've learned quite a few things from them. Unfortunately, ShellQuote::Any::Tiny doesn't do it right:
because it escapes every backslash. But only terminating one, which precedes the closing double-quote (if any), should be escaped -- as follows from "Everyone quotes command line arguments the wrong way". Win32::ShellQuote appears to handle everything correctly. Actually, I lived happily before this, relying only on Perl's built-in ability to double-quote arguments, which contain spaces. Until someone, in her wisdom, decided that a double-quote in the middle of template name, to be passed as argument to another script, is a good idea.
In Section
Seekers of Perl Wisdom
|
|