develooper Front page | perl.beginners | Postings from August 2009

Perl module Net::Oping Error

Thread Next
August 23, 2009 18:07
Perl module Net::Oping Error
Message ID:
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:


  use Net::Oping ();

  my $obj = Net::Oping->new ();
  $obj->host_add (qw(;

  my $ret = $obj->ping ();
  print "Latency to `one' is " . $ret->{''} . "\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

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About