I am writing a script to ping several systems and then to run nslookup on those that fail the ping test. How do I capture the exit status of the system commands. I tried something like:
$status = system("nslookup xxx.xxx.xxx.xxx");
print "$status";
but this seems to print "0" every time whether the nslookup found the
IP address or not.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
