In addition to just quoting the arguments, which is a good start, you should note that perl's system command can
accept an array as its argument. Like this:
This is a nice solution, because then you don't have to worry about escaping things (like quotes) that the OS does not like in the arguments themselves.