This is a CGI script, let's call it uppercase.cgi: #!/usr/bin/env perl use strict; use warnings; use CGI; use Encode::Simple; use JSON::MaybeXS; use Syntax::Keyword::Try; my $cgi = CGI->new; try { my $input = decode 'UTF-8', scalar $cgi->param('input'); print $cgi->header('application/json; charset=UTF-8'), encode_json...