in reply to Re^2: passing params to an exe in a perl script
in thread passing params to an exe in a perl script

What qx is doing is calling the shell perl -V:sh, and shell usually doesn't like newlines (which is apparently why in bash you use heredoc), so you have to quote/escape/encode/serialize those args, for which you can use String::ShellQuote ( or Win32::ShellQuote )

Or use IPC::Run3, its not backticks but it handles quoting for you

Or use IPC::System::Simple capturex, its close to backticks, and it can handles quoting for you

  • Comment on Re^3: passing params to an exe in a perl script