#!/usr/local/bin/perl use CGI qw(:cgi-lib :standard); print header(); # Geturl.pl # # A little Perl script to read, decode and print the names # and values passed to it from an HTML Form thru CGI. # Get the HTML header, ender, define the page title. require "/cgi-local"; # full path ? to what ? # print "Content-type: text/html\n\n"; # another GTE addin $Title = "Get Information From a URL"; # Get the query string # $QueryString = $ENV{'QUERY_STRING'}; # Use split to make an array of name-value pairs broken at # the ampersand char. @NameValuePairs = split (/&/, $QueryString); # Put up an HTML header, page title, and a rule. &HTML_Header ($Title); print "\n"; print "

$Title

\n"; print "
\n"; # Split each of the name-value pairs and print them on the page. foreach $NameValue (@NameValuePairs) { ($Name, $Value) = split (/=/, $NameValue); print "Name = $Name, Value = $Value
\n"; } &HTML_Ender;