in reply to Re^5: System command using array and pipe
in thread System command using array and pipe
I prefer
tomy ($passwd_lit, $path_lit) = map text_to_shell_lit, $passwd, $path; system("mysqldump --add-drop-table -uroot -p$passwd_lit mydatabase | g +zip -9c > $path_lit");
my $passwd_lit = $passwd; my $path_lit = $path; s#'#'\\''#g for $passwd_lit, $path_lit; system("mysqldump --add-drop-table -uroot -p'$passwd_lit' mydatabase | + gzip -9c > '$path_lit'");
but to each his own.
By the way, your quoting was buggy. "\" is not special in sh single-quoted literals.
In Section
Seekers of Perl Wisdom