use perl to get the IP address of the host