by calling this sub below, when the script is first executed it will place any querys into an array.
ie.. for your example it would be,
Code:
parse_form;
$thedata = $input{'thedata'};
#ie.. thedata would equal bob
(the parse form sub that is called,
Code:
sub parse_form {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
if (length($buffer) < 5) {
$buffer = $ENV{QUERY_STRING};
}
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$input{$name} = $value;
}
}