473,395 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Include Header and Footer to Print From Perl?

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!
Apr 2 '06 #1
4 6766
Al Franz wrote:
2. Can you include the html code in the perl script without having to
include a "\" prior to every quote?


Yes. Look for "Quote-like Operators" in `perldoc perlop`. qq{} and
here-doc in particular.

http://perldoc.perl.org/perlop.html
Apr 3 '06 #2
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?

"Joe Smith" <jo*@inwap.com> wrote in message
news:Aa********************@comcast.com...
Al Franz wrote:
2. Can you include the html code in the perl script without having to
include a "\" prior to every quote?


Yes. Look for "Quote-like Operators" in `perldoc perlop`. qq{} and
here-doc in particular.

http://perldoc.perl.org/perlop.html

Apr 3 '06 #3
Al Franz wrote:
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
Apr 3 '06 #4
Al Franz wrote:
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.
2. Can you include the html code in the perl script without having to
include a "\" prior to every quote?

Yes. Look for "Quote-like Operators" in `perldoc perlop`. qq{} and
here-doc in particular.

http://perldoc.perl.org/perlop.html


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

-Joe
Apr 4 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ruca | last post by:
Can I add dinamicaly (in my code) a header and a footer for each time I want to print a web page from my web application? NOTE: The print command made for my is a click in a button that I have in...
2
by: LilBuh | last post by:
hi there :) i ve been looking for some time a way to print an html file from vb.net i came up with this code for printing and removing the header and footer from IE then once the printing is done...
0
by: LilBuh | last post by:
Hello :) this is a repost... i ve been looking for a way since last week ... i have a template html file that i modify from my code... i need to print this file without IE's Header and Footer or...
7
by: Neil Jarman | last post by:
Hi, I would like to allow users to print a page, but I want to suppress the header and footer that appear by default. I gather its done with a style sheet. Please advise. Many Thanks,
14
by: Markus Olderdissen | last post by:
each web-page contains header and footer. if the web-page contains more then one page i want to print its header and footer to each page. but header is only printed on first page and footer on last...
6
by: G | last post by:
Hello Friend, I am newly migrated from ASP to ASP.NET. When i am using ASP i used have a folder with named includes where i store header. asp and footer.asp pages. and i use <!-- #include...
1
by: Shalako | last post by:
I check my error log and see these entries: malformed header from script. Bad header= Missing gauge reports are ind: padata.pl /perl/pema/padata.pl did not send an HTTP header malformed...
0
by: krishnagovindaraj | last post by:
Hi, I have to create word document with header and footer..its working in web layout.In Print Layput,the header is displayed two times..Plz give me the solution...its very urgent.. strBody =...
25
by: Mark | last post by:
so, i'm making a website. let's say i have header.php, footer.php and content.php. now in index.php I simply want to include the 3 pages. easy enough to do. but let's say the user navigates to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.