for my $key ( $cgi->param ){ my @values = $cgi->multi_param( $key ); $cgi->param( $cgi->escapeHTML("@values") ); }