in reply to Running a backticks command in a CGI script

Try capturing STDERR in addtion to the STDOUT output:
$result = `foobar 2>&1`
You should also check the value of "$?". From the docs:
$? may be set to non-0 value if the external program fails. The upper eight bits reflect specific error conditions encountered by the program (the program's "exit()" value).

             "I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
        -- Dr. Cox, Scrubs

Replies are listed 'Best First'.
Re^2: Running a backticks command in a CGI script
by Cody Fendant (Hermit) on Apr 14, 2013 at 08:47 UTC
    That's done the trick, thank you. I have a full, detailed and ... incomprehensible error message now. But that's cool, I've solved the immediate problem.