trewornan has asked for the wisdom of the Perl Monks concerning the following question:
and the perl is:<form method="post" action="scgi-bin/formhandler.pl" enctype="text/pla +in"> <p id="invite">Leave Us a Message</p> <div> <label for="name">Name:</label> <input type="text" id="name" /> </div> <div> <label for="mail">E-mail:</label> <input type="email" id="mail" /> </div> <div> <label for="message">Message:</label> <textarea id="message"></textarea> </div> <div class="button"> <button type="submit">Send Message</button> </div> </form>
I checked and $in is getting no data, it's just an empty string - why? Utterly confused!read (STDIN, $in, $ENV{'CONTENT_LENGTH'}); @in = split(/&/, $in); foreach $i (0 .. $#in) { $in[$i] =~ s/\*/ /g; $in[$i] =~ s/%(..)/pack("c", hex($1))/ge; ($key, $val) = split(/=/, $in[$i],2); $in{key} .= '\0' if (defined($in{$key})); $in{key} .= $val; }
|
|---|