Hi,
I have the following problem:
I am extracting the CIDR information with the help of 'whois'. Then I
want to use Net::Netmask and work further with network blocks but after
invoking
print $block->desc();
I get the following:
could not parse 125.60.0.0/16
Use of uninitialized value in pack at
/usr/lib/perl5/site_perl/5.6.1/Net/Netmask.pm line 212, <> line 1.
Use of uninitialized value in concatenation (.) or string at
/usr/lib/perl5/site_perl/5.6.1/Net/Netmask.pm line 136, <> line 1.
0.0.0.0/
Here is the following code:
my @test=`whois $ip_address`; #get whois information
if ( grep /CIDR:|route/, @test ) {
my @net = grep{ $_ =~ /CIDR:|route/;} @test;
$_ = "@net";
s/CIDR:|route:/ /;
s/^\s+//;
$cidr=($_);
$block = new Net::Netmask($cidr);
print $block->desc();
}
Do you have any suggestions what might be the problem?
Thanks,
Marija
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- Re: Net::Netmask problem Marija Silajev
- Re: Net::Netmask problem P lerenard
