Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Net::Ping 2.63 Failing

by g_speran (Scribe)
on Jan 17, 2018 at 04:56 UTC ( [id://1207394]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Net::Ping 2.63 Failing
in thread Net::Ping 2.63 Failing

I don't disagree with that. But is it the functionality of the module to check if the IP is in a valid rage, or it it the function of Net::Ping, to "ping" or attempt to ping, the ip address supplied? Again, at least in 2.43 version, the Net::Ping did not completely exit the running perl script. In the 2.61 & 2.63 versions, the script errors out and stops any further execution

Replies are listed 'Best First'.
Re^5: Net::Ping 2.63 Failing
by karlgoethebier (Abbot) on Jan 17, 2018 at 12:12 UTC

    BTW, in doubt and if you don't believe it you may write a test:

    #!/usr/bin/env perl use strict; use warnings; use Data::Validate::IP qw(is_ipv4); use Test::More tests => 2; my $perlmonks = q(209.197.123.153); my $nowhere = q(192.168.10.991); ok( defined( is_ipv4($perlmonks) ), qq(ipv4 $perlmonks) ); ok( defined( is_ipv4($nowhere) ), qq(ipv4 $nowhere) ); __END__ karls-mac-mini:playground karl$ ./ip.pl 1..2 ok 1 - ipv4 209.197.123.153 not ok 2 - ipv4 192.168.10.991 # Failed test 'ipv4 192.168.10.991' # at ./ip.pl line 12. # Looks like you failed 1 test of 2.

    Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1207394]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-24 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found