Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<STDIN> not working

Status
Not open for further replies.

theguru97321

IS-IT--Management
Feb 3, 2003
216
US
I don't know if I just have an old version of PERL or CGI.pm but I'm trying to use STDIN to decode METHOD=POST forms.

$blah = <STDIN>;

always comes back blank.

$data_length = $ENV{'CONTENT_LENGTH'};
($data_length for one script is 31)
# Read in the string
$bytes_read = read(STDIN, $blah, $data_length)
($bytes_read always equals 0, and $blah is still empty)

What could be wrong???
 
You should be assigning variables to form param()s.

Code:
my $username = param("username");
my $password = param("pass");
 
I do that for the forms I'm parsing. But this is for a 'global' ability.

I'm trying to allow my users to be able to set ANY page with in the app as their home/default page.

But many of the pages that users would like, are results of specific querys.

There are hundreds of possible variables, and STDIN should account for them all dynamicly. With out the need to create more code for something that SHOULD already work.

Since I posted this, I found a way around this, but I would still like to explore why STDIN is not working on my server.

If you need to know more about my system, please ask, I'm not sure what you would need so I'll leave it at that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top