That's the whole point. You do not seem to know exactly what you want to do. My first question on the thread was: what do you mean, to grow or shrink an IP address (this was not a rhetorical question, I do not know what this really means)? You just can't hope to solve the problem in Perl if you don't know what the underlying operation should be. And it turns out that this is not really a Perl question, but a networking question (which does not mean that you might not find a Perl module answering these questions and solving it for you). I think you should really "google" the underlying functional question and make sure you understand fully what you need to do before trying to figure out how to do it.