in reply to Simple nslookup

Regexp::Common

I was looking to have something simple and not have to install any modules.

To clarify: you would not actually have to install Regexp::Common to use one of its regular expressions. You can search for the regular expression that you need, copy the expression out of the module source code, then paste it into your own program.

Replies are listed 'Best First'.
Re^2: Simple nslookup
by Fletch (Bishop) on Feb 29, 2008 at 23:11 UTC

    Erm, just how the frell is a regular expression going to do a reverse lookup on an IP address? I know there were some changes in the engine in 5.10, but really . . .

    (That inanity aside, gethostbyaddr that's been pointed out below is the easiest method presuming the underlying OS has a working resolver setup).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.