I am trying to pass on value to this file and then store them as variables. However, I tried to print the values to see whether they work. I do not get any output.
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("c", ex($1))/eg;
$FORM{$name} = $value;
}
foreach $key (keys(%FROM)) {
print "$key = $FORM{$key}<br>";
}
Please keep in mind that there are other parts of the program in the same program that work.
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("c", ex($1))/eg;
$FORM{$name} = $value;
}
foreach $key (keys(%FROM)) {
print "$key = $FORM{$key}<br>";
}
Please keep in mind that there are other parts of the program in the same program that work.