david_levine
asked on
Perl include output
I have ASP pages that load in standard headers & footers using the following:
<!--#include virtual="/headers/header.i nc" -->
Now I have 1 perl script (someone gave me) that I want to include the same headers and footers as I do in my ASP page.
The current static code the perl script generates is:
print "<HEAD>\n";
print "\t<TITLE>Telephone Directories Search Results</TITLE>\n";
print "</HEAD>\n\n";
What do I need to do to output the code from the above include file (after the title)?
Thanks!
David
<!--#include virtual="/headers/header.i
Now I have 1 perl script (someone gave me) that I want to include the same headers and footers as I do in my ASP page.
The current static code the perl script generates is:
print "<HEAD>\n";
print "\t<TITLE>Telephone Directories Search Results</TITLE>\n";
print "</HEAD>\n\n";
What do I need to do to output the code from the above include file (after the title)?
Thanks!
David
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to the both of you!
I've adjusted the points from 75 down to 50 and will give the 50 to akf and post another question in this section for ozo for an additional 50.
Thanks again
I've adjusted the points from 75 down to 50 and will give the 50 to akf and post another question in this section for ozo for an additional 50.
Thanks again
ASKER
Oops... clicked the wrong button! :(
akf... I'll post your points as a new question in this section.
akf... I'll post your points as a new question in this section.
# it will put a comment in your HTML saying why -- so look at the source
# if you don't see your file.
#
# You'll need to include the full path to header.inc.
my $incfile = "/fullpath/headers/header.
open (INFILE, "<$incfile") || print "<!-- couldn't open $incfile: $! -->\n" ;
my $buf;
{ local ($/) = undef ; # slurp entire file (not one line at a time)
$buf = <INFILE>;
}
close INFILE;
print $buf;