in reply to Log a Post Request

You could log it first, and replace STDIN with a in-memory file (open(local *STDIN, '<', \$raw_data)) but the following might be sufficient:

use URI::Escape qw( uri_escape_utf8 ); foreach my $key ($cgi->param()) { foreach my $val ($cgi->param($key)) { printf("%s=%s\n", uri_escape_utf8($key), uri_escape_utf8($val), ); } }

You could also look at CGI's save method.