develooper Front page | perl.perl5.porters | Postings from January 2003

Re: [perl #19682] perldoc using \n rather than \r\n

Philip Newton
January 23, 2003 20:24
Re: [perl #19682] perldoc using \n rather than \r\n
Message ID:
On 23 Jan 2003 at 4:12, via RT wrote:

> Do I understand correctly that this is simply a documentation issue, as in "do not
> try to use the Win98 as your pager"?

*tries a few things out* Maybe. "type" can also not handle \n-
terminated lines, but when I "binmode STDOUT" and then output \n-
terminated lines from Perl, it displays correctly. (And DJGPP 'od' says 
that with binmode it sees '\n' and without it sees '\r\n', so the 
binmode does have an effect.) So I suppose the actual console output 
routines (or, or whoever is responsible) *can* handle \n as 
line terminator.

Still, there isn't much choice under Win98. I don't think using WordPad 
as a pager (as ActiveState support suggested) is really the right 
solution. (And I don't even know whether it accepts input from STDIN 
anyway.) Hardly anyone, I'll assume, has DJGPP less or Vern Buerg's 
LIST or some other pager.

I think it would be much preferable to open the temporary file in text 
mode -- after all, Perl documentation is (more or less by definition) 
text. That way, we could accommodate Win98's brain-damaged; 
after all, in previous releases it worked all right (when perldoc 
opened its own temp file in the default -- text -- mode rather than 
relying on File::Temp, which opens files in binary mode).

What do you suggest? Documenting that Win98's does not work as 
a pager? What should Win98 users use then? (Note that "no pager" is not 
an option, either, since the Win9x console window does not have 
scrollback the way NT consoles do -- so you only see the last max. 50 
lines. At least as far as I can see. And telling them to "redirect 
output into a text file and open that with your favourite editor" is 
not very user-friendly, either, IMO.)

Philip Newton <> Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About