Apache::ASP Powered by ModPerl & Apache Powered by Apache::ASP
Demo ASP: source.asp 2015-11-25

Source of file cgi.htm:

	# This code was ripped almost straight out of CGI.pm, by Lincoln Stein.
	# The code was the bulk of the SYNOPSIS section of CGI.pm v2.46
use strict;
use CGI qw(:standard);

my $query = new CGI;
my $cookie;
my $name;

if($name = param('name')) {
    $cookie = cookie(-name=>'name',
$name ||= cookie('name');
print header(-cookie=>$cookie);
<!--#include file=header.inc-->
<% print
    h1('A Simple Example'),
    "What's your name? ",textfield('name'),p,
    "What's the combination?", p,
		   -defaults=>['eenie','minie']), p,
    "What's your favorite color? ",

if (param()) {
    print "Your name is ",em($name),p,"\n",
    "The keywords are: ",em(join(", ",param('words'))),p,"\n",
    "Your favorite color is ",em(param('color')),"\n",


This script is a demonstration of using the CGI.pm library
in an ASP script.  Please remember that using CGI.pm will 
probably NOT be portable with PScript and PerlScript.
As of version 0.09, you may use CGI for reading form input
without any change to regular use of CGI.  Before, you couldn't
do a <pre> use CGI; </pre> by itself, as it would try to read
form input that had already been loaded into $Request->Form().
Form input is now cached, and may be loaded into CGI as well.
In short, use of CGI.pm is now transparent in Apache::ASP,
as both output and input have been merged seemlessly.
<a href="source.asp?file=<%=$Request->ServerVariables("SCRIPT_NAME")%>">
view this file's source

	print end_html;

view this file's source