in reply to Need to calculate IP address

Hello ddrew78,

It looks the fellow Monks, have answered your question. I just wanted to add something minor here.

What you are trying to achieve is also possible to be done with the module NetAddr::IP.

Sample of code:

#!/usr/bin/perl use strict; use warnings; use NetAddr::IP; use feature 'say'; say NetAddr::IP->new('127.0.0.1/8') + 255; say NetAddr::IP->new('127.0.1.6/8') - 255; __END__ $ perl test.pl 127.0.1.0/8 127.0.0.7/8

Hope this helps, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!