- or download this
>perl -MShellQuote::Any::Tiny=shell_quote -E "system $^X, '-E', 'say f
+or @ARGV', 1, shell_quote(qq(\x5c\x5c \x5c)), 2"
1
\\\ \
2
- or download this
perl -E "system $^X, '-E', 'say for @ARGV', qq(\x22abc\x22 d e)"
perl -E "system $^X, '-E', 'say for @ARGV', qq(a\x5c\x5c\x5cb d\x22e f
+\x22g h)"
perl -E "system $^X, '-E', 'say for @ARGV', qq(a\x5c\x5c\x5c\x22b c d)
+"
perl -E "system $^X, '-E', 'say for @ARGV', qq(a\x5c\x5c\x5c\x5c\x22b
+c\x22 d e)"
- or download this
$arg =~ s/(\\(?!.*\\)|\\(?=\\)|")/\\$1/g;
- or download this
$arg =~ s/\\(?=\\*(?:"|$))/\\\\/g;
$arg =~ s/"/\\"/g;
- or download this
perl -MShellQuote::Any::Tiny=shell_quote -E "system $^X, '-E', 'say fo
+r @ARGV', map {shell_quote $_} qw(abc d e)"
perl -MShellQuote::Any::Tiny=shell_quote -E "system $^X, '-E', 'say fo
+r @ARGV', map {shell_quote $_} qq(a\x5c\x5c\x5cb), 'de fg', 'h'"
perl -MShellQuote::Any::Tiny=shell_quote -E "system $^X, '-E', 'say fo
+r @ARGV', map {shell_quote $_} qq(a\x5c\x22b), 'c', 'd'"
perl -MShellQuote::Any::Tiny=shell_quote -E "system $^X, '-E', 'say fo
+r @ARGV', map {shell_quote $_} qq(a\x5c\x5cb c), 'd', 'e'"