http://qs321.pair.com?node_id=372542


in reply to What's the bug ?

You need to create a Net::IP object. Try this
#!/usr/local/bin/perl use strict; use Net::IP; my $ip = new Net::IP('193.0.1/24') or die (Net::IP::Error()); print ("Mask : ", $ip->mask());
PS. using strict would have prevented this error.

Update: Added IP in constructor. Directly from CPAN.

- Tom