.+?)($default_template_title)(.+?<\/h2>)/$1$article_title$3/s; # change the article title
}
else
{
####################################
####################################
# Read top HTML page template
$html_template_top = $html_template . "_top.html";
open(TOP, "<./templates/$html_template_top") or die "Cannot open file \'$html_template_top\' $!";
while ($line = )
{
$top .= $line;
}
close TOP;
$top =~ s/(.+?)($default_template_title)(.+?<\/h2>)/$1$article_title$3/s; # change the article title
####################################
####################################
# Read bottom HTML page template
$html_template_bottom = $html_template . "_bottom.html";
open(BOTTOM, "<./templates/$html_template_bottom") or die "Cannot open file \'$html_template_bottom\' $!";
while ($line = )
{
$bottom .= $line;
}
close BOTTOM;
}
####################################
####################################
print "$top\n";
####################################
####################################
#### MY PERL CODE COMES IN HERE ####
####################################
print "Hello, World!
\n";
print "This is my first Perl CGI script (more precisely, a CGI emulation by Apache's mod_perl module) running on the web server side!!!
\n";
print "view source code
\n";
print "I am puffing with pride! :-)))\n";
print "
\n";
####################################
########## END OF MY CODE ##########
####################################
print "\n";
print "$bottom";
.+?)($default_template_title)(.+?<\/h2>)/$1$article_title$3/s; # change the article title
####################################
####################################
# Read bottom HTML page template
$html_template_bottom = $html_template . "_bottom.html";
open(BOTTOM, "<./templates/$html_template_bottom") or die "Cannot open file \'$html_template_bottom\' $!";
while ($line = )
{
$bottom .= $line;
}
close BOTTOM;
}
####################################
####################################
print "$top\n";
####################################
####################################
#### MY PERL CODE COMES IN HERE ####
####################################
print "Hello, World!
\n";
print "This is my first Perl CGI script (more precisely, a CGI emulation by Apache's mod_perl module) running on the web server side!!!
\n";
print "view source code
\n";
print "I am puffing with pride! :-)))\n";
print "
\n";
####################################
########## END OF MY CODE ##########
####################################
print "\n";
print "$bottom";
\n"; print "This is my first Perl CGI script (more precisely, a CGI emulation by Apache's mod_perl module) running on the web server side!!!
\n"; print "view source code
\n"; print "I am puffing with pride! :-)))\n"; print "
\n"; #################################### ########## END OF MY CODE ########## #################################### print "\n"; print "$bottom";