#! perl -slw use strict; use Win32::PingICMP; my $p = new Win32::PingICMP; die 'No hosts specified' unless @ARGV; print $_, ' : ', $p->ping( $_ ), ' : ', $p->details->{host}, ' : ', $p->details->{status} for @ARGV; __END__ D:\Perl\test>ping.exe perlmonks.com Pinging perlmonks.com [209.197.123.153] with 32 bytes of data: Reply from 209.197.123.153: bytes=32 time=280ms TTL=242 Reply from 209.197.123.153: bytes=32 time=261ms TTL=242 Reply from 209.197.123.153: bytes=32 time=250ms TTL=242 Reply from 209.197.123.153: bytes=32 time=251ms TTL=242 D:\Perl\test>ping.exe 128.231.013.057 Pinging 128.231.11.47 with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. D:\Perl\test>ping 128.231.013.057 209.197.123.153 "my" variable $count masks earlier declaration in same scope at d:/Perl/site/lib/Win32/PingICMP.pm line 121. 128.231.013.057 : 0 : 128.231.013.057 : IP_REQ_TIMED_OUT 209.197.123.153 : 1 : 209.197.123.153 : IP_SUCCESS