Home : Visit Our Store : Latest Specials : Recommend Us
Contact Us :
Support Forum : Multiple Domain Discount
Perl Template Creator
Go to www.cgiscript.net for more free tools!

Use this code to create easily modifiable html templates for use in your perl cgis. Hate having to place all the print statements in your program and having to escape all those quotes? Would you like to give the ability for people who don't know how to program in perl to customize the output of your cgis? Templates are the answer. Here's how it works. Take any html file and anywhere you place in(variable), it gets replaced with $in{'variable'}. For example, if you have $in{'name'} = 'bob' and an html file that has:
Name: in(name)
The output would look like:
Name: bob
Follow Steps 1 and 2 below. Use the 'Grab Text' buttons to select the code within the adjacent textarea. Then use Control-C or Edit -> Copy to buffer the text for pasting into your document.

Usage (Step 1): Use this code to call the subroutine. Replace [page] with either a relative or full path to the html template. Example: &PageOut("t_index.htm"); where 't_index.htm' is your template file. Any line that has in(variable) will be replaced with $in{'variable'}

Then use Control-C to copy the text into your web page.

Code (Step 2): Add the following code somewhere within your script.

Then use Control-C to copy the text into your web page.

| Recommend Us | Contact Us