Your split is using a regex like construct instead of
split PATTERN, EXPR and the result (I think) is that you're splitting on $_, which isn't being set in the sub and who knows what it holds. Try:
my @a = split /./, $a->[0]; #split IP address on periods
...
You didn't give any sample data so I can't say for certain if this is the problem, but it might be it.
--
Snazzy tagline here