Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Perl >> Snippet

CGI script for web page with embedded variables


#!/usr/bin/perl

$value = "Sample Information"        # create your own values or draw them from %ENV

print << WEBPAGE;
Content - type: text / html\n\n          # note alternate way to put in the extra space
< html >
< head >
< title > my Web Page </ title >
</ head >
< body bgcolor = "#FFFFFF" >
< h2 > my Web Page </ h2 >
This page brought to you by ...
< img src = " http://www.vbinformation.com/images/gbsample.gif " >
< p >
< hr noshade >
$value
< hr noshade >
< p >
Note that the checkbox name - value pair is not included if
it was not checked on the calling form .
< p >
Thank you for trying out this sample Perl script .
</ BODY >
</ html >

WEBPAGE            #no trailing white spaces allowed