sub some_run_mode { my $self = shift; # note that CGI.pm does the same thing: my @params = $self->param; my %hash = map { $_ => $self->param( $_ ) } @params; }