> bubslg wrote:
> > Help! I have a script that does a pingprobe on a list of servers. I
> > works fine with perl v5.6.1, but does not work with 5.8.8. It looks
> > like the return value from net::ping has changed. In 5.6.1 I always
> > get a return of either 1 or 0. In 5.8.8 I get a 1 or 0 with a bunch
> > of other data including the ip being pinged appended, meaning my
> > return value is alway going to be non-0. As a result a simple test
> > like
> > use Net::Ping;
> > my $p = Net::Ping->new("icmp");
> > print $p->ping("somehost");
> > $p->close();
> > is never going to work. Why the change in the return value, and how
> > do I fix it?
> In the latest version of Net::Ping, what the ping() method returns is
> context dependent.
> perldoc Net::Ping
> Evaluate ping() in scalar context:
> print scalar $p->ping("somehost");
> --
> Gunnar Hjalmarsson
> Email:http://www.gunnar.cc/cgi-bin/contact.pl- Hide quoted text -
>
Thanks Gunnar! That did the trick!