#!C:/perl/bin/perl.exe -w use strict; use URI::Escape; use CGI qw/:no_debug/; my $q = CGI->new(); my $file = "encodeTable.html"; my $outdata = ""; open OUT, ">$file" or die "Cannot open $file: $!\n"; for ( 0 .. 255 ) { my $char = chr( $_ ); my $escaped = uri_escape( $char ); unless ( $escaped ne '%20' ) { $escaped .= ' or +' }; $outdata .= $q->Tr( $q->td( { -align => 'right' }, [ $_ < 33 ? ' ' : $char, $_ , $escaped ] ) ); } print OUT $q->start_html( -title => "Uri Character Codes", -style => { src => '../style.css' }, -author=> 'poec@yahoo.com' ), $q->table( { -border => 1 }, $q->Tr ( $q->th( [ 'Symbol', 'ASCII Value', 'URI encoded' ] ) ), $outdata ), $q->end_html; close OUT;