title: How to assign Action to a Button in perl cgi?
body: <p>So I have a button in my CGI Perl. On clicking that button I need to assign a action in perl CGI, on clicking that button a New text-area should open with specified width in the same page with a submit button. Please help me on how I can proceed. Here is the code which is not really working for me. On clicking on submit button, I what to email the message to a email id </p>
  
  <p>Here I print the button</p>
  
  <pre><code>print button('email',"email me","reqts()");
  </code></pre>
  
  <p>Here is the <code>opentextarea</code> subroutine</p>
  
  <pre><code>sub reqts {
  
     print "&lt;p&gt;&lt;em&gt;Enter your Message here&lt;/em&gt;&lt;br&gt;";
     print textarea(-name=&gt;'Comments',
                        -rows=&gt;10,
                        -columns=&gt;50);
     print submit('Action','Send');
  
  }
  </code></pre>
  
  <p>On clicking this button the subroutine is not getting called.</p>
  
  <p>This button is on a html form in another subroutine </p>
  
  <pre><code>sub actions {
  print
    start_html(),
    start_form(-action =&gt; 'com.pl'),
    submit(-name =&gt; 'submit', -value =&gt; 'View com.pl'),
     end_form,
    print button('email',"email me","reqts()"),   # this is the button
    start_form(-action =&gt; 'about.pl'),
    submit(-name =&gt; 'submit', -value =&gt; 'About Us');
    end_form,
    end_html;
  }
  </code></pre>