in reply to Why can't a run a system command?

Instead of:
system("ffmpeg -blah blah blah");
try:
$output=`ffmpeg -blah blah blah`; print $output
It could be something as simple as not being in the right path.

Replies are listed 'Best First'.
Re^2: Why can't a run a system command?
by markh (Scribe) on Oct 17, 2006 at 19:34 UTC
    You really should put the full path to any system commands that are run from a CGI. You cannot guarantee that $ENV{PATH} in the CGI environment will be the same as it is during your login session.
      You really should put the full path to any system commands that are run from a CGI. You cannot guarantee that $ENV{PATH} in the CGI environment will be the same as it is during your login session.

      Furthermore, it's a FAQ too, and a suitable Super Search reveals quite a lot of potentially interesting hits.

Re^2: Why can't a run a system command?
by chromatic (Archbishop) on Oct 17, 2006 at 19:55 UTC

    What difference is there between system and qx that will fix path problems?

      I think coldmiser assumed that qx would capture the error message. But it won't, as it'll go out through STDERR. So redirecting 2>&1 on the command line of qx/backticks will probably allow the script to see what is wrong.