473,767 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6791
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.co m> wrote in message
news:Aa******** ************@co mcast.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
1487
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 my web page, and not in browser menu File->Print -- Programming ASP.NET with VB.NET Thank's (if you try to help me)
2
9272
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 restore the original header and footer Imports Microsoft.Win32 Private WithEvents myprocess As Process Private OldHeader As String
0
1908
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 any print dialog then once the printing's done... restore the original Header and footer but here's what happens: - save the current header and footer
7
9519
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
3050
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 page. how to do this? how can i find out how many paper is needed?
6
11541
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 file ="'' --to access those files where ever in need. SO now my doubt is how to use the same thing(header & footer parts) in
1
24166
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 header from script. Bad header= : padata.pl /perl/pema/padata.pl did not send an HTTP header 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
2216
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 = "<html xmlns:o='urn:schemas-microsoft-com:office:office' " & _ "xmlns:w='urn:schemas-microsoft-com:office:word'" & _ "xmlns='http://www.w3.org/TR/REC-html40'>" strBody = strBody + "<!-->" & _ "<xml>" & _ "<w:WordDocument>" & _
25
2267
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 mysite.com/content.php. now the header and footer will appear to be missing. so now the question is, how can i include the header and footer in content.php only if the page isn't already nested?
0
9571
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9405
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10169
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10013
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9960
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8838
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5424
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.