sub create_web_page { my %in_data = ( @_ ); my $file = "C:/windows/desktop/cgi_course/appendices/appendix2.html"; # Always check return codes! open OUT, ">$file" or die "Cannot open $file for writing: $!\n"; print OUT $q->start_html( -title => "URL and HTML Character Codes", -style => { src => '../style.css', type => 'text/css' }, -author=> 'poec@yahoo.com' ), $q->h1( 'URL and HTML Character Codes' ). $q->p( 'This Web page was created with Perl, using CGI.pm and several other modules.', 'See the source code at the end of the page for how I created it.' ), $q->p( 'Some may object to my listing HTML character codes for "unused" characters', 'such as ASCII 127 (hex 7F), but browser support for these characters is spotty.', 'Different browsers will choose to render these characters or not (e.g. IE 5.01', 'recognizes € as the Euro "€" symbol, but Netscape 4.7 does not). Owing', 'to this difficulty, I have elected to leave things as they are and let you pick', 'and choose the characters you need as you like.' ), $q->em( 'Amongst other things, the program reads its source code to create this page.' ), $q->p( ' ' ), $q->table( $q->Tr ( $q->th( $in_data{ headers} ) ), $in_data{ data } ), $q->p( 'Back to the ' . $q->a( { -href => '../index.html' }, 'table of contents' ) . '.' ), $q->pre( { class => 'program' }, $in_data{ code } ), $q->end_html; close OUT; }