is NOT failing. It's the Perl script that's failing. It doesn't like the arguments you passed to it. You probably used
without quoting and escaping the contents of arg1 and arg2. (Injection attack vulnerability!) You could properly quote and escape their contents properly, or use
which calls the program directly instead of passing the command string to an intermidary shell.