#!/usr/bin/perl use strict; use LWP::Simple; my @content = get("http://www.whatismyip.com/"); foreach (@content) { chomp; print "$1\n" and last if /