I guess if you are willing to rewrite it, that will probperply be the easiest thing to do. Because I have no idea what the QUERY_STRING or the QUERY_STRING_UNESCAPED are. Nor do I have any idea how to identify the method as GET or POST.
I guess learning CGI is going to be harder than I...