in reply to Websites

You should learn the HTML shortcuts that are provided with the CGI module. The following subroutine from this web page generates a Web page using Perl, with no HTML in the Perl, which is what I assume is what you are asking for.
sub create_web_page { my %in_data = ( @_ ); my $file = "C:/windows/desktop/cgi_course/appendices/appendi +x2.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 s +everal other modules.', 'See the source code at the end of the page for how I cr +eated 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 the +se characters is spotty.', 'Different browsers will choose to render these characte +rs or not (e.g. IE 5.01', 'recognizes € as the Euro "€" symbol, but Netsc +ape 4.7 does not). Owing', 'to this difficulty, I have elected to leave things as t +hey 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' }, 'ta +ble of contents' ) . '.' ), $q->pre( { class => 'program' }, $in_data{ code } ), $q->end_html; close OUT; }
However, this is usually a bad idea if you want to create large, scalable sites. http://www.template-toolkit.org has a great discussion of why templates are typically the way to go. If the Template Toolkit is too daunting, try Using HTML::Template. It's a simpler solution and very easy to implement.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.