in reply to Passing values from an AJAX call to non-CGI Perl script

Tru URI-escaping the parameters like:
%3Ffirst%3D%3CTMPL_VAR%20NAME%3D%22FR%22%3E%26last%3D%3CTMPL_VAR%20NAM +E%3D%22LA%22%3E
If in perl, you coud use URI::Escape.

                Memory fault   --   brain fried