#!/usr/bin/perl -w use strict; =pod AUTHOR Tommy Butler phone: (817)-468-7716 6711 Forest Park Dr Arlington, TX 76001-8403 COPYRIGHT Tommy Butler. All rights reserved LISCENCE This software is free, use/distribute under the GNU GPL. BUGS TO Tommy Butler INSTALLATION (2 easy steps) 1. Place this script in your cgi bin directory. 2. Change permissions on this script to 755 on linux/unix systems by using your FTP client software, or from a command line shell by typing the following command after entering the directory where this script is located: chmod -v 755 [ script name ] NOTE- You can find more free Perl code at The ooOPps Open Source Code Library =cut ++$|; use CGI qw( header param ); my($token) = qr/\Q%%%\E(.*?)\Q%%%\E/; my($form) = &form(); if (param('reset')) { $form =~ s/$token//g; } else { $form =~ s/$token/param($1)||''/ge; } print(header, $form); sub form { <<__HTML__ } Simple Perl CGI Form
 

Welcome %%%NAME%%%

 
Your Name  
Your Favorite Fruit  
Your Favorite Color  
Your Favorite Animal  
Your Favorite Website  

 

 

__HTML__