If you are running it "as a CGI", make sure that your web
server is not inside a chroot jail or has not any syscall
filtering, like systrace...
I have this problem some months ago (with Net::Telnet) and then I found out that "systrace" was causing the problem.
Did it work running from the command line ?