http://www.perlmonks.org?node_id=25670


in reply to How do I get at the parameters in my CGI program?

As contributed by icuc:
use strict; use CGI; # ..... my $q = new CGI; my %params = {}; { my @params_names = $q->param; for(@params_names) { $params{$_} = $q->param($_); } }

or, a shorter way, as contributed by slayven:

use CGI; my $q = new CGI; my %in = map { $_ => $q->param($_) } $q->param;

Click this Answer to see merlyn's note about $q...