in reply to inet_aton

inet_aton() takes a dotted quad and can return the host name using gethostbyaddr(). If you want a dotted quad returned, then use gethostbyname() and inet_ntoa:
use strict; use Socket; my $p = gethostbyname('localhost'); my $ip = inet_ntoa($p); print "$ip\n";
Here is a sample use of inet_aton():
perl -MSocket -le 'print scalar gethostbyaddr(inet_aton("127.0.0.1"),A +F_INET)'
I hope that answers your question.

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--