#!/usr/bin/perl #-------------INFO---------------# ## Matrix 1.0 ## Author: Andrew Rosolino ## Site: http://www.webewebin.com #-------------START--------------# ## Load Modules use CGI::Carp "fatalsToBrowser"; use DBI; &ReadParse; print "Content-type: text/html\n\n"; if($in{'boo'}) { print "Yea"; } else { print "No"; } ### Read Parse sub ReadParse { local (*in) = @_ if @_; local ($i, $key, $val); # Read in text read(STDIN,$in,$ENV{'CONTENT_LENGTH'}); @in = split(/[&;]/,$in); foreach $i (0 .. $#in) { # Convert plus's to spaces $in[$i] =~ s/\+/ /g; # Split into key and value. ($key, $val) = split(/=/,$in[$i],2); # splits on the first =. # Convert %XX from hex numbers to alphanumeric $key =~ s/%(..)/pack("c",hex($1))/ge; $val =~ s/%(..)/pack("c",hex($1))/ge; # Associate key and value $in{$key} = $val; } }