You might check out my column on "processing forms remotely", which shows a quick way to capture every param in a protected manner (all nasty characters escaped) then unrolling it at the other end in a way that you can write a "normal" CGI script (using CGI.pm).