#!perl -w use strict; use CGI; use Data::Dumper; sub do_foo { my( %params )= @_; print Dumper \%params; if( $params{ is_admin }) { print "Is admin\n"; } else { print "No admin\n"; }; }; my $q= CGI->new(); do_foo( is_admin => 0, foo => $q->param('foo') ); #### perl -w test.pl foo=1 perl -w test.pl foo=bar perl -w test.pl foo=0&foo=is_admin&foo=yeah&foo=another_parameter&foo=yippieh