title: How do I send POST data with LWP?
body: <p>I want to make a program that communicates with <a href="http://www.md5crack.com/crackmd5.php" rel="noreferrer">http://www.md5crack.com/crackmd5.php</a>. My goal is to send the site a hash (md5) and hopefully the site will be able to crack it. After, I would like to display the plaintext of the hash. My problem is sending the data to the site. I looked up articles about using LWP however I am still lost. Right now, the hash is not sending, some other junk data is. How would I go about sending a particular string of data to the site?</p>
  
  <pre><code>use HTTP::Request::Common qw(POST);  
  use LWP::UserAgent; 
  
  
  $ua = LWP::UserAgent-&gt;new();  
  my $req = POST 'http://www.md5crack.com/crackmd5.php', [ 
   maxlength=&gt; '2048',
   name=&gt; 'term',
   size=&gt;'55',
   title=&gt;'md5 hash to crack',
   value=&gt; '098f6bcd4621d373cade4e832627b4f6',
   name=&gt;'crackbtn',
   type=&gt;'submit',
   value=&gt;'Crack that hash baby!',
  
  ]; 
  $content = $ua-&gt;request($req)-&gt;as_string; 
  
  print "Content-type: text/html\n\n"; 
  print $content;
  </code></pre>