Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Unexpected behavior with Net::Netmask

by Chmrr (Vicar)
on Jul 31, 2002 at 20:14 UTC ( #186586=note: print w/ replies, xml ) Need Help??


in reply to Unexpected behavior with Net::Netmask

ferrancy has almost certainly hit the nail on the head. A bit of simple testing with the following program:

use Net::Netmask; use strict; use warnings; my $b = new2 Net::Netmask( '218.0.0.0 - '.shift(@ARGV).'.255.255.255') or die "Argh: $Net::Netmask::error"; print map "$_\n", $b->base, $b->mask, $b->size, $b->next;

..shows that it can't deal with many of the ranges around there, ("could not fine exact fit for...") but erroneously thinks that it finds one with a range of 216.0.0.0 - 219.255.255.255 when you ask it for your particular case, 218.0.0.0 - 221.255.255.255! Why it does that instead of erroring out, I don't know; my guess is that t'is a bug.

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'


Comment on Re: Unexpected behavior with Net::Netmask
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2015-07-07 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls