hi all        I installed Net::Oping module. I run it ,but I can't get right
values . Please give me some light. Thanks in advance.
I write these code:

#!/usr/bin/perl

  use Net::Oping ();

  my $obj = Net::Oping->new ();
  $obj->host_add (qw(www.example.org));

  my $ret = $obj->ping ();
  print "Latency to `one' is " . $ret->{'www.example.org'} . "\n";

  my $my_ttl=$obj->get_dropped();
  print 'my ttl is '.$my_ttl."\n";
  my $my_drop=$obj->get_dropped();
  print 'my_drop '.$my_drop."\n";
  my $my_err_msg=$obj->get_error();
  print 'my_error: '.$my_err_msg."\n";

The result is:

Latency to `one' is
my ttl is HASH(0x9e4e5f4)
my_drop HASH(0x9e4e66c)
my_error: Success

Reply via email to