Example
homencsa resources partnershipsoutreachsoftware_tech
alliance searchinside ncsa adv_computingsciencedivisions
left up right comment

Example

Continuing with our script, remeber that we had an array of strings that contained the CGI name/value pairs. Now we'll iterate through them and create an associative array for easy manipulation later.
 
	foreach $pair ( @cgiPairs ) { 
		($var,$val) = split("=",$pair); 
		#trust me on this magic. 
		$val =~ s/\+/ /g; 
		$val =~ s/%(..)/pack("c",hex($1))/ge; 
		$cgiVals{"$var"} = "$val"; 
	} 
	$recipient = $cgiVals{"to"}; 
The magic included in the fourth line is to decode the special characters that aren't allowed to be in a URL. For now, please take it on trust.
left up right comment



NCSA
The National Center for Supercomputing Applications

University of Illinois at Urbana-Champaign

johnsonb@ncsa.uiuc.edu

Last modified: June 19, 1997



Retrieved by Memoweb from http://www.ncsa.uiuc.edu/General/Training/PerlIntro/example2.html at 08/02/99