use strict; use warnings; use CGI::Simple; $CGI::Simple::PARAM_UTF8 = 1; my $q = CGI::Simple->new(); $q->charset('utf-8'); binmode STDOUT,':encoding(UTF-8)'; print $q->header(-type => 'text/plain'); print $q->param('text'),"\n";