Include Header and Footer to Print From Perl?

A

Al Franz

Editing a script that has a "sub printheader" and "sub printfooter" routine
before and after it creates a web page with a message. I would like to
customize this script so that I can have my own header and footer. What is
the best way to do this?

1. Can you create a "sub" that references a separate file to print as a
header and footer?
2. Can you include the html code in the perl script without having to
include a "\" prior to every quote?

Thanks!
 
A

Al Franz

Having Perl print the contents of another file containing the header and
footer information is not a possibility though? I need to put the HTML code
within the Perl script?
 
J

Jürgen Exner

Al said:
Having Perl print the contents of another file containing the header
and footer information is not a possibility though? I need to put
the HTML code within the Perl script?

See
perldoc -f open

jue
 
J

Joe Smith

Al said:
Having Perl print the contents of another file containing the header and
footer information is not a possibility though?

I never said that. I did not bother answering that part since the answer
is so obvious. Perl was created to create reports - reading in multiple
files, analyzing them, and printing the results.

Question: Have you ever used the "here-doc" feature? It is very
useful, and I recommend you try it.

-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top