2010-07-01
Does the following look OK?
#! perl print "content-type: text/html\n\n"; my $stdin=<STDIN>;
When called in a browser,
(from a server using windows 2003, IIS 6, and perl
5.10), the page hangs and does a continuous load.
Note: my $stdin is not being printed (e.g. print $stdin;).
If <STDIN> is undefined,
then I believe $stdin=<STDIN>; would be also be undefined,
and calling the page would just display a blank page.
To expand my examples,
I am getting the same problem after I send something to STDIN as follows...
#! perl use warnings; use strict; print "content-type: text/html\n\n"; my$stdin=<STDIN>; print $stdin;
The html page that sends something to the STDIN page contains the following...
<html><body> <form src="my_stdin.pl" method="post"> <input type="text" name="TEXT"> <input type="submit"> </form> </body></html>
When the html page sends something to the STDIN page, the page still hangs and does a continuous load.
I'm believing the hanging is because of the configuration of the IIS 6 server.
What is your opinion about this ?
When responding, list some similar code that works, without CGI.pm or other Module, because I believe the above examples should work as is without any Modules. Although, I should note, that CGI.pm does work, both when param() is on the same page as the form, and when something is sent to another Page that prints the param().
Thanks.
- Look For God.
In reply to STDIN not working, STDIN hanging by FRIENDOFGOD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |