use strict; use Net::SMTP; use LWP::UserAgent; my $from = 'ergowolf07@home.com'; my @recip_list = ('XXXXXXX@skytel.com'); my $smtp_host = "mail"; # This line generates and error my $smtp = Net::SMTP->new($smtp_host, Timeout => 30) || die "Can't connect to $smtp_host.\n"; $smtp->mail($from) || die "cannot mail from.\n\n"; $smtp->recipient(@recip_list); $smtp->data(); $smtp->datasend("To:\tEbay info\n"); my $page = 'http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=XXXXXXXXXX'; my $ua = new LWP::UserAgent; my $req = new HTTP::Request GET => $page; my $string = $ua->request($req)->as_string; if ($string =~ m/tmonte/g) { $smtp->datasend("you are the high bidder.\n"); } else { $smtp->datasend("You are no longer the high bidder.\n"); } $smtp->dataend; $smtp->quit;