#!/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());