The following cut down version of your script (removing the CGI component) seems to function correctly. Maybe you have a down-level version of something?

#! 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:/Per +l/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

The versions I am using are

D:\Perl\test>perl -mWin32::PingICMP -de1 Loading DB routines from perl5db.pl version 1.19 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. Win32::API::Type::CODE(0x1b6af60)(d:/Perl/site/lib/Win32/API/Type.pm:4 +0): 40: my $section = 'nothing'; DB<1> M 'AutoLoader.pm' => '5.59 from d:/Perl/lib/AutoLoader.pm' 'Carp.pm' => '1.01 from d:/Perl/lib/Carp.pm' 'Carp/Heavy.pm' => 'd:/Perl/lib/Carp/Heavy.pm' 'Config.pm' => 'd:/Perl/lib/Config.pm' 'DynaLoader.pm' => '1.04 from d:/Perl/lib/DynaLoader.pm' 'Exporter.pm' => '5.566 from d:/Perl/lib/Exporter.pm' 'Term/Cap.pm' => '1.08 from d:/Perl/lib/Term/Cap.pm' 'Term/ReadLine.pm' => '1.00 from d:/Perl/lib/Term/ReadLine.pm' 'Win32/API.pm' => '0.41 from d:/Perl/site/lib/Win32/API.pm' 'Win32/API/Struct.pm' => '0.40 from d:/Perl/site/lib/Win32/API/Struct. +pm' 'Win32/API/Type.pm' => '0.40 from d:/Perl/site/lib/Win32/API/Type.pm' 'Win32/PingICMP.pm' => '0.02 from d:/Perl/site/lib/Win32/PingICMP.pm' 'perl5db.pl' => '1.19 from d:/Perl/lib/perl5db.pl' 'strict.pm' => '1.02 from d:/Perl/lib/strict.pm' 'vars.pm' => '1.01 from d:/Perl/lib/vars.pm' 'warnings.pm' => '1.00 from d:/Perl/lib/warnings.pm' 'warnings/register.pm' => '1.00 from d:/Perl/lib/warnings/register.pm' DB<1>

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller



In reply to Re: Win32::PingICMP returns odd results by BrowserUk
in thread Win32::PingICMP returns odd results by tbone

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.