http://www.perlmonks.org?node_id=193932


in reply to Setting Content-Type when POSTing with LWP

This is untested and I have to rush off but I hope it works
#!perl use strict; use warnings; use LWP::UserAgent; use HTTP::Headers; use HTTP::Request; my $content = join '', <DATA>; my $ua = LWP::UserAgent->new(); my $h = HTTP::Headers->new( Content_Disposition => 'form-data; name="fname"; filename="deposit +1.xml"', Content_Length => length($content), Content_Type => 'text/xml' ); my $r = HTTP::Request->new('POST', 'http://search.cpan.org/', $h, $con +tent); my $response = $ua->request($r); __DATA__ <?xml version="1.0"?> ...
   larryk                                          
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"