http://www.perlmonks.org?node_id=89781


in reply to Regex to cange HTML %?? to char(0x??);

All your escaping and unescaping is handled by CGI. Try this (untested) code.

use CGI; use strict; my $q = new CGI; #get a list of parameter names my @params = $q->param(); # Start HTML Output print $q->header(),$q->start_html('FOO'); # Print a table of params and values. print "<TABLE>"; print << EHTML; <TR> <TH>Parameter</TH> <TH>Value</TH> </TR> EHTML foreach (@params) { my $value = $q->param($_); print << EHTML; <TR> <TD>$_</TD> <TD>$value</TD> </TR> EHTML } print "</TABLE>", $q->end_html();

Note that I use here docs for most of the HTML generation. While CGI.pm can do HTML generation, I prefer to make minimal use of that capability. I always use its parameter handling, which is great.


TGI says moo