The only issue that cannot be resolved by single quoting relevant parts of the command line is of escaping single quotes. Either do this manually, or do something simple like this:
s#'#'\\''#g for ($password, $path); system("mysqldump --add-drop-table -uroot -p'$password' mydatabase | g +zip -9c > '$path'");
Update: s/// command corrected as per ikegami.
In reply to Re^5: System command using array and pipe
by philipbailey
in thread System command using array and pipe
by civil777
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |