#!/usr/bin/perl -w use strict; use HTTP::Request::Common qw(POST); use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $req = POST 'http://www.booksforeducation.com/testbed/fred.php', [ XML => $last, ]; my $response = $ua->request( $req )->as_string; print $resposne; # That's the output from your php script...