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: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to