Código
#!/usr/bin/perl $ip=GetPublicIp(); if($ip ne "Error"){ }else{ } sub GetPublicIp{ #Funcion Por Isseu use LWP::Simple; use LWP::UserAgent; use HTTP::Request; use HTTP::Response; $URL="http://ip.interchile.com/"; $browser = LWP::UserAgent->new(); $browser->timeout(5); my $request = HTTP::Request->new(GET => $URL); my $response = $browser->request($request); if(!$response->is_error()){ $data=$response->content(); if($data=~/<font size=7>(.+\..+\..+\..+)<\/font>/){ }else{ } }else{ } }