Hi,
While I'm studying a guestbook processing cgi perl script, I found
below segment commonly found in many illustrating examples of html
form processing.
# GET THE INPUT FROM THE CALLING HTML DOCUMENT
read(STDIN, $buffer, $ENV{'CONTENT_L ENGTH'});
# Split the name-value pairs
@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;
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
I would like to know does $FORM is special or reserved variable in
perl just like $_[0], $ENV have special usage ?
:)
While I'm studying a guestbook processing cgi perl script, I found
below segment commonly found in many illustrating examples of html
form processing.
# GET THE INPUT FROM THE CALLING HTML DOCUMENT
read(STDIN, $buffer, $ENV{'CONTENT_L ENGTH'});
# Split the name-value pairs
@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;
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
I would like to know does $FORM is special or reserved variable in
perl just like $_[0], $ENV have special usage ?
:)
Comment