the reason why i am doing it the way i am is so that an IP address that somehow gets to the system like '01.1.1.010' is successfully resolved to '1.1.1.10'. If you pass that to inet_aton directly I get (at least on this system with activestate perl version 5.6) 0.1.1.0.