my $ip = "$ENV{'REMOTE_ADDR'}"; #Tomar el ip print "Content-type: text/html\n\n"; #header de HTML print "Tu ip es: $ip\n";