#!/usr/bin/perl use CGI:Somesolution qw(getAllInputAsHash); # user input, decoded from UTF my $userinput = getAllInputAsHash({decodeUtf => 1}); #### #!/usr/bin/perl use CGI; use Encode; my $cgi = CGI->new; sub decodedForSomeTypes { $ENV{CONTENT_TYPE} =~ /boundary/ ? $_[0] : decode_utf8($_[0]); } my $params = +{ map { $_ => decodedForSomeTypes(scalar $cgi->param($_)) } $cgi->param() };