title: Pass value from HTML page form to a CGI program
body: <p>I'm trying to create a simple program that will get the content of the webpage for the sake of my assignment.</p>
  
  <p>Right now I create a very simple HTML page that will let the user enter a URL.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;title&gt;URL page&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;form action="cgi-bin/b1.cgi" method="GET"&gt;
          Enter the URL you want to see &lt;input type="text" name="passing" size=40&gt;
          &lt;input type="submit" value="submit"&gt;
          &lt;/form&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>so I just want to pass the url to my CGI program that I have so far</p>
  
  <pre><code>#!/usr/bin/perl
  
  print "Content-type: text/html\n\n";
  
  use LWP::Simple;
  use CGI;
  use HTML::HeadParser;
  
  #my $pass = $cgi-&gt;param('passing');
  
  $URL = get ("$passing");
  
  $head = HTML::HeadParser-&gt;new;
  
  $head-&gt;parse("$URL");
  
  print "This is the Title of the page" . $head-&gt;header('Title') . "\n\n";
  
  print $head-&gt;header('X-Meta-Description') . "\n\n";
  
  print $head-&gt;header('X-Meta-Keywords') . "\n\n";
  
  print $head-&gt;header('Content-Type') . "\n\n";
  
  print $head-&gt;header('Content-Language') . "\n\n";
  
  exit;
  </code></pre>
  
  <p>So from the above code as you can see if I can get the value that pass from the <code>GET</code> method to the line where it say <code>URL = get();</code> then I can get the content.</p>
  
  <p>I tried some approch like <code>my $pass = $cgi-&gt;param('passing');</code> but it gives me an error about <code>param</code></p>
  
  <p>Any suggestion would be so much appreciated.</p>