in reply to How to do an HTTP post for multiple files using HTTP::Request::Common ?

my @files = ("C:/foo.jpg", "C:/bar.jpg"); my $ua = LWP::UserAgent->new(); my $req = POST $url, Content_Type => 'form-data', Content => [ submit => 1, (map { "file".($_+1) => [ $files[$_] ] } 0..$#files), ];
  • Comment on Re: How to do an HTTP post for multiple files using HTTP::Request::Common ?
  • Download Code

Replies are listed 'Best First'.
Re^2: How to do an HTTP post for multiple files using HTTP::Request::Common ?
by roadrunner (Acolyte) on Nov 23, 2007 at 21:19 UTC
    Thanks - this worked a treat.