Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Some code

by stephen (Priest)
on Apr 24, 2002 at 21:15 UTC ( #161795=note: print w/ replies, xml ) Need Help??

in reply to Some code
in thread use strict seems to hose my code

First, what you have there is one of the oldest bits of hand-recopied Perl code on the Internet. It's from the original 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. :)


Comment on Re: Some code
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://161795]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2015-11-28 01:47 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (737 votes), past polls