Try printing $! and see if it is No such file or directory.
In reply to Re^3: DNScmd in perl script by pc88mxer in thread DNScmd in perl script by ajd335