#! /usr/bin/perl use strict; use HTTP::Request::Common; use LWP; die "Usage: xml_post.pl XML_query_file [service_url]\n" if (scalar(@ARGV) == 0); my $url = 'http://www.insuma.de/cgi-bin/focus/web2xml.py'; $url = $ARGV[1] if (scalar(@ARGV) >= 1); my $ua = LWP::UserAgent->new; my $responce = $ua->request(POST $url, Content_Type => 'form-data', Content => [ xml_query => [$ARGV[0]], ] ) or die "Could not send the request"; print $responce->content, "\n";