I was the guy :)

Strange, because the "Writing Apache Modules..." book explicitly tells you
that you CAN do this (use <STDIN> to read the post line by line).

Based on my experience, and your snippet below, I'm guessing the book is
incorrect :)

-jse


> From: "Eric L. Brine" <[EMAIL PROTECTED]>
> Date: Thu, 25 Nov 1999 01:39:44 -0400
> To: [EMAIL PROTECTED]
> Subject: <STDIN> reads everything as one line
> 
> 
> A few days ago, someone mentioned doing
> $scalar = <STDIN>
> read the whole POSTed data.
> 
> I stumbled upon the following in Apache.pm:
> #shouldn't use <STDIN> anyhow, but we'll be nice
> sub READLINE { 
> my $r = shift;
> my $line; 
> $r->read($line, $r->header_in('Content-length'));
> $line;
> }
> This snippet is the tied sub which handles line reads from STDIN.
> Apparently, his problem had nothing to do with $/ as was suggested. I
> guess he should be using $r to access the POSTed data.
> 
> ELB
> 
> --
> Eric L. Brine  |  Chicken: The egg's way of making more eggs.
> [EMAIL PROTECTED]  |  Do you always hit the nail on the thumb?
> ICQ# 4629314   |  An optimist thinks thorn bushes have roses.
> 

Reply via email to