Loading ...
Sorry, an error occurred while loading the content.

Re: Passing form input to subroutine

Expand Messages
  • Brat Wizard
    In my applications, I generally scoop up the form into a hash and then pass it as a hash ref. eg: my $form = $Request- Form(); myfunc($form); sub myfunc { my
    Message 1 of 3 , Sep 9, 2002
    • 0 Attachment
      In my applications, I generally scoop up the form into a hash and then pass it
      as a hash ref. eg:

      my $form = $Request->Form();
      myfunc($form);

      sub myfunc {
      my $form = shift;
      print "Use like this: ", $form->{key};
      print "Or like this: ", $$form{key};
      }

      Hope this helps

      John

      On Monday 09 September 2002 01:24 pm, Josh Chamas spewed into the ether:
      > Charlie Farinella wrote:
      > > I'm passing parameters from a form to a result page, and then trying to
      > > call a subroutine from an external package to process the variable.
      > >
      > > I'm using $Request->Form to get the value from the form to the result
      > > page, but my subroutine is unable to make use of it. What is required
      > > to make the subroutine aware of the variable?
      --

      --------------------------------------------------------------------------------
      Check out http://www.Wizard.Org for great deals on Electronic Parts
      *NEW* Computer Parts & Accessories - Drives - LCD - Systems - Linux
      --------------------------------------------------------------------------------
      ** Affordable Online Store w/Merchant Card Processing & Paypal **
      Write to us: sales@... -- Get your Store Online Today!
      --------------------------------------------------------------------------------



      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    Your message has been successfully submitted and would be delivered to recipients shortly.