Don't ask to ask, just ask | |
PerlMonks |
Re: Some codeby stephen (Priest) |
on Apr 24, 2002 at 21:15 UTC ( [id://161795]=note: print w/replies, xml ) | Need Help?? |
First, what you have there is one of the oldest bits of hand-recopied Perl code on the Internet. It's from the original cgi-lib.pl by a nice fella named Steve Brenner. You should use CGI. See use CGI or die; for why. Next, %ENV is a global variable. Putting it in a my declaration will wipe it clean. Thus there will be no $ENV{'QUERY_STRING'}, no $ENV{'CONTENT_LENGTH'}, thus no $buffer, and thus no output. There's no need to try to localize %ENV; strict knows it's a global and won't yammer. Update: Never mind %ENV, $buffer is empty. Use CGI instead. :) stephen
In Section
Seekers of Perl Wisdom
|
|