in reply to Pinging an ip range

You may want to have a look at the snippet of code which I posted in the thread Iterate network hosts - Using this code, you could ping a range of hosts specified by network and subnet mask with the following code:

use Net::Netmask; use Net::Ping::External qw/ ping /; ping( 'host' => $_ ) for ips( '10.0.0.0/29' ); sub ips { my $net = Net::Netmask->new(@_); wantarray ? $net->enumerate : \@{$net->enumerate}; }

 

perl -le 'print+unpack("N",pack("B32","00000000000000000000001000100110"))'