in reply to Re: Re: Re: gethostbyname("1.1.1") returns 1.1.0.1 ????
in thread gethostbyname("1.1.1") returns 1.1.0.1 ????

I'm pretty sure that's not the reason. First, addresses like 127.1 work even if you do not give a a netmask. Secondly, the notation was used even before we had classless networks, and we were still dealing with A, B, C and D class networks.

Note that many utilities also accept addresses in hex, octal, or even a combination of hex, octal and decimal:

$ ping -c 1 0x42.047.54.0x1b # www.perlmonks.org PING 0x42.047.54.0x1b (66.39.54.27): 56 data bytes 64 bytes from 66.39.54.27: icmp_seq=0 ttl=244 time=114.3 ms --- 0x42.047.54.0x1b ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max = 114.3/114.3/114.3 ms $

Abigail