Return to Snippet

Revision: 41509
at February 19, 2011 03:30 by Mazzaroth


Initial Code
sub getLocalhostIpAddress
{
    my @addr = (gethostbyname(hostname()))[4];
    return join ('.', unpack ("C4", $addr[0]));
}

Initial URL

                                

Initial Description

                                

Initial Title
getLocalhostIpAddress

Initial Tags

                                

Initial Language
Perl