in reply to gethostbyname one-liner: Improvements?
Short and simple:
Or even shorter:perl -MSocket -E'say inet_ntoa "".gethostbyname shift' domain
Or if you want one line of Perl as opposed to a one-liner,gethost domain
say gethost($host);
Writing program gethost and/or function gethost is left to you.
|
|---|