in reply to Problem capturing the output of external command

A possible explanation is that $cmd doesn't print its output to STDOUT but instead to STDERR. If that's the case you might need IPC::Open3 instead of open, or some redirect magic of which I'm not aware right now.