in reply to Re^3: making a difference between POST parameters and URL parameters
in thread making a difference between POST parameters and URL parameters

Well, if it's a POST query, param() will only get you POST params.

You can get GET params by instancing another CGI object like this:

my $get = CGI->new($ENV{'QUERY_STRING'});

Example:

use strict; use warnings "all"; use CGI; my $post= CGI->new; my $get = CGI->new($ENV{'QUERY_STRING'}); my $foo_from_post = $post->param('foo'); my $foo_from_get = $get->param('foo');

Replies are listed 'Best First'.
Re^5: making a difference between POST parameters and URL parameters
by afoken (Chancellor) on Jan 28, 2010 at 19:24 UTC

    Or you could RTFM and use the url_param() method of the existing object instead.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)