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

Please explain how can you ping an invalid address? What would you fill into the 32bits of the "Destination IP address"? How do you change the ascii 991 or 331 into a 8bit binary number?

Replies are listed 'Best First'.
Re^4: Net::Ping 2.63 Failing
by g_speran (Scribe) on Jan 17, 2018 at 04:39 UTC
    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
Re^4: Net::Ping 2.63 Failing
by g_speran (Scribe) on Jan 17, 2018 at 04:56 UTC

    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

      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