#!/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__