How do I get both the GET and the POST parameters?

param() returns the POST parameters when a form is POSTed. Otherwise it returns the query string parameters (the part of the URL after the "?").

The query string parameters are always available via url_param():

Example

  use CGI qw/:standard/;

  my $post_tomato = param('tomato');
  my $get_tomato  = url_param('tomato');

<< Previous Contents >> Next >>

Lincoln D. Stein, lstein@cshl.org
Cold Spring Harbor Laboratory
Last modified: Sat Jun 19 13:24:02 EDT 1999