![]() |
Perlaccess : Tutorials : Subroutines Creating Header & Footer Subroutines (11.4) by Brett Roberts http://www.bigresources.com |
To make life easier when creating your web page's html inside of a perl
script, you can make it so that you only have to code your header and footer
html once.
1). Create a text document and type sub Header { as the
first line.
1). In the same text document as above type sub Footer { after line space or two after the sub header routine 2). Next, type print "\n</BODY></HTML>"; 3). Next, type } to end the subroutine
1). In your script, where you normally place require statements, type require "textdocumentname.lib"; 2). Later in your script where you wish to call your subroutines appropriately type &Header; to call your header subroutine and &Footer for your footer subroutine according to where you wish to place them. |