title: How to post array form using LWP
body: <p>I am having problems creating an array that I can pass as a form using LWP. Basic code is</p>
  
  <pre><code>my $ua = LWP::UserAgent-&gt;new();
  my %form = { };
  $form-&gt;{'Submit'} = '1';
  $form-&gt;{'Action'} = 'check';
  for (my $i=0; $i&lt;1; $i++) {
      $form-&gt;{'file_'.($i+1)} = [ './test.txt' ];
      $form-&gt;{'desc_'.($i+1)} = '';
  }
  
  $resp = $ua-&gt;post('http://someurl/test.php', 'Content_Type' =&gt; 'multipart/form-data'
  , 'Content =&gt; [ \%form ]');
  
  if ($resp-&gt;is_success()) {
      print "OK: ", $resp-&gt;content;
  }
  } else {
      print $claimid-&gt;as_string;
  }
  </code></pre>
  
  <p>I guess I am not creating the form array correctly or using the wrong type as when I check the _POST variables in test.php nothing has been set :(</p>