#!/perl/bin/perl #geturl.pl # # A little perl script to read, decode and print the names # and values passed to it from an HTML form through CGI # Get HTML header, ender, define the page title. require "/pub/scripts/perl-cgi/html.pl"; # Full Path $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 character. @NameValuePairs = split(/&/,$QueryString); # Put up an HTML heaer, 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 to the page. foreach $NameValue (@NameValuePairs) { ($Name, $Value) = split (/=/, $NameValue); print "Name = $Name, value = $Value
\n"; } # End the HTML document. &HTML_Ender; # End geturl.pl