in reply to getting output from backticks

I haven't used it myself, but the module IPC::Open3 will let you do this and more. You'll have to create filehandles for STDIN, STDOUT, and STDERR. You should be able to read the error message from the STDERR handle.

buckaduck