C:\Temp>perl -MNet::Ping -e "$p = Net::Ping->new(); print qq|host is alive.\n| if $p->ping('127.0.0.1');" perl -MNet::Ping -e "$p = Net::Ping->new(); print qq|host is alive.\n| if $p->ping('127.0.0.1');" host is alive.