#!/usr/bin/perl -w $|++; use HTTP::Request::Common; use LWP::UserAgent; my $file = '/home/steven/error-codes'; open(INFO, $file) or die "Couldn't open $file: $!"; while (){ chomp; $ua = LWP::UserAgent->new; $ua->request (POST 'http://www.pager-co.hah/cgi-bin/wwwpage.cgi', [PIN => 'xxx5551212', MSSG => "$_", ]); } close(INFO) or die "Error writing $file: $!";