in reply to IP address generation

Guessing wild I'd say you used something like
@a = split /./, "192.168.0.1";
which does not work as you might think, because the first parameter of split is a regular expression. Hence the dot is special and you must escape it.
@a = split /\./, "192.168.0.1";


holli, /regexed monk/