use strict; use Socket; print inet_ntoa(gethostbyname('whatismyip.com') ."\n";