Actually, traceroute doesn't "return a lot", it returns 0 for success, and 1 for failure, like many programs. It does "output a lot", but that's easy to fix. See if this works for you:
#!/usr/bin/perl use strict; use warnings; # IP adress or hostname of the remote machine to test my $remote = "192.168.0.2"; if(system("traceroute $remote 1> /dev/null 2>&1")) { print "$remote is down\n"; } else { print "$remote is up\n"; } __END__
In reply to Re^3: Testing for live IP's
by beable
in thread Testing for live IP's
by Elijah_A
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |