sub index { #&top_nav; &weather; &date; #read in template page for INDEX.HTML####################################### my $templateFileIndex="../../htdocs/temp_test/ia_index.html"; open(INFILE,"<$templateFileIndex"); my @templatePageIndex=; close(INFILE); #condense page array into one scalar variable my $tIndex=join("",@templatePageIndex); #search-and-replace on date, nav bar and variables $tIndex=~s/%%INSERT DATE HERE%%/$liveDate/g; #$tIndex=~s/%%BLURB%%/$blurb/g; #$tIndex=~s/%%AGENT_NAME%%/$agent_name/g; #$tIndex=~s/%%URL%%/$url/g; $tIndex=~s/%%WEATHER%%/$weather/g; $tIndex=~s/%%WEATHER2%%/$test/g; #tIndex=~s/%%INSERT NAV HERE%%/$navPage/g; #done, output page to browser print $tIndex; exit } ############################################################################ sub weather { # read in footer template $foot='weather/weather.cgi'; open(MYFOOT,"<$foot"); @footerPage=; close(MYFOOT); #condense page array into one scalar variable $weather=join("",@footerPage); $test="Test Variable"; }