in reply to Re: CGI, STDIN and chomp problem: bug?
in thread CGI, STDIN and chomp problem: bug?
I think using CGI is somewhat misplaced here.
I'm sorry, my post clearly wasn't specific enough. The whole point is that I only get the problem when I use CGI. If I comment out the use CGI line, chomp removes my newline in the normal fashion.
However, your answer helped clarify the issue. If I add
$/= "\r\n";at the top of the code, the problem goes away.
It would seem that CGI.pm resets $/ without localising the change. Bug?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: CGI, STDIN and chomp problem: bug? (input)
by tye (Sage) on Jul 14, 2007 at 16:25 UTC | |
by Not_a_Number (Prior) on Jul 14, 2007 at 17:23 UTC | |
by daxim (Curate) on Jul 14, 2007 at 19:54 UTC | |
|
Re^3: CGI, STDIN and chomp problem: bug?
by moritz (Cardinal) on Jul 15, 2007 at 13:56 UTC | |
by Not_a_Number (Prior) on Jul 15, 2007 at 15:21 UTC |