[HRPM] scaler or array and why?

Michael Theiss webmaster at udtseals.com
Mon Aug 21 12:37:49 CDT 2000


Hello all,
I'm working with a web page that includes several .shtml files that I'm
using for a master template.

Question: I need to put all of parsed and interpolated output of
master_htm.pl  page into a variable that will then be assigned to an array.
Should I put master_htm.pl into a scaler or an array and can you give me an
ideal how to approach that. Thanks in advance.

Michael Theiss

webmaster at udtseals.com



To view the current output of master_htm.pl
http://www.udtseals.com/cgi-bin/0/warrior_links0/templates/master_htm.pl

master_htm.pl
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "<head>\n";
print "<!--START META DATA -->\n";
{
&PostIt;
}
print "<!--END META DATA -->\n";
print "<link rel='stylesheet' type='text/css' href='/style.css'
title='style' />\n";
{
&PostIt0;
}
print "</head>\n";
print "<body>\n";
print "<!--START HEADER -->\n";
{
&PostIt1;
}
print "<!--FINISH HEADER -->\n";
print "<!--START OUTER TABLE -->\n";
{
&PostIt2;
}
print "<!--FINISH LEFT TABLE -->\n";
print "<!--START MIDDLE TABLE -->\n";
{
&PostIt3;
}
print "<!--START BODY CONTENT -->\n";
print "<!--START INNER MIDDLE TABLE -->\n";
print "<table width='100%' bgcolor='#6b736b' border='0'>\n";
print "<tr><td align='center'>\n";



print "<form method='POST' action='category.cgi?display=form'>\n";
print "<p align='center'>&nbsp;<select size='1' name='category'>\n";
print "<option value='NULL..Category' selected>Quick Jump To</option>\n";
print "<option value='/'>Main</option>\n";
print "<!--CATEGORY OPTIONS-->\n";
print "</select><input type='submit' value='GO' name='B1'></p>\n";
print "</form>\n";
print "<h5 align='center'>[<a href='$add_url'>Add</a>] [<a
href='/cgi-bin/0/warrior_links0/main.cgi'>Search</a>]&nbsp;</h5>\n";


print "<p>!INSERT!</p>\n";





print "</td></tr>\n";
print "</table></td></tr>\n";
print "</table></td>\n";
print "<!--FINISH INNER MIDDLE TABLE -->\n";
print "<!--FINISH BODY CONTENT -->\n";
print "<!--START RIGHT TABLE -->\n";
{
&PostIt4;
}
print "<!--FINISH  OUTER TABLE -->\n";
print "<!--START FOOTER -->\n";
{
&PostIt5;
}
#print "<!--#echo
var='LAST_MODIFIED'-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--#e
cho var='DATE_LOCAL'-->\n";
print "<!--FINISH CONTAINER TABLE -->\n";
print "</body>\n";
print "</html>\n";



sub PostIt
{
$postit="/home/alphaudt/www/cgi-bin/0/includes/meta_data.shtml";

open (POST,$postit) || die "can't open $postout";
$postit="";
while (<POST>){$postit .=$_;}
close(POST);

print "$postit";

}


sub PostIt0
{
$postit="/home/alphaudt/www/cgi-bin/0/includes/onmouseover.shtml";

open (POST,$postit) || die "can't open $postout";
$postit="";
while (<POST>){$postit .=$_;}
close(POST);

print "$postit";

}


sub PostIt1
{
$postit="/home/alphaudt/www/cgi-bin/0/includes/header.shtml";

open (POST,$postit) || die "can't open $postout";
$postit="";
while (<POST>){$postit .=$_;}
close(POST);

print "$postit";

}


sub PostIt2
{
$postit="/home/alphaudt/www/cgi-bin/0/includes/left_nav_table.shtml";

open (POST,$postit) || die "can't open $postout";
$postit="";
while (<POST>){$postit .=$_;}
close(POST);

print "$postit";

}


sub PostIt3
{
$postit="/home/alphaudt/www/cgi-bin/0/includes/start_middle_table.shtml";

open (POST,$postit) || die "can't open $postout";
$postit="";
while (<POST>){$postit .=$_;}
close(POST);

print "$postit";

}


sub PostIt4
{
$postit="/home/alphaudt/www/cgi-bin/0/includes/right_table.shtml";

open (POST,$postit) || die "can't open $postout";
$postit="";
while (<POST>){$postit .=$_;}
close(POST);

print "$postit";

}


sub PostIt5
{
$postit="/home/alphaudt/www/cgi-bin/0/includes/footer.shtml";

open (POST,$postit) || die "can't open $postout";
$postit="";
while (<POST>){$postit .=$_;}
close(POST);

print "$postit";

}
1;
----------------------------------------------------------------------------
------------------------------------------------------------------






More information about the Norfolk-pm mailing list