I have no idea what is causing this, but if I had to guess, I'd say it's some artifact/bug of the XS code. But are you sure it doesn't just work when you try it a second time? (That is, comment out the $ipaddr2 line.)
Jeff japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and perlhacker How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart