in reply to Re^2: CGI, STDIN and chomp problem: bug?
in thread CGI, STDIN and chomp problem: bug?
I'm sorry, Doctor, I wasn't clear enough. I only get the pain when I do *this*, ouch.
CGI scripts don't read input interactively from users so the "bug" here is your "bug" of trying to use CGI.pm along with stuff that clearly won't work in a CGI script.
No, I doubt CGI.pm is changing $/. Have you looked at the source code? My guess is that CGI.pm is doing binmode on STDIN (which it makes some sense for it to do).
Now, if you want to actually explain why you think it makes sense to combine CGI.pm with interactive input, for example, by telling us more about what you are trying to do, then we could probably tell you the proper way to prevent this problem.
No, setting $/ like you did is not the proper way, actually. Please take a look at what $/ is set to when you don't use CGI.pm. And try not to be confused by the unfortunate wording of perlport. :)
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: CGI, STDIN and chomp problem: bug? (input)
by Not_a_Number (Prior) on Jul 14, 2007 at 17:23 UTC | |
by daxim (Curate) on Jul 14, 2007 at 19:54 UTC |