Click here to get back home

odd chars in perldoc prior to 5.10.0 (was: Re: How to print question)

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
odd chars in perldoc prior to 5.10.0 (was: Re: How to print question) szr 04-17-2008
Posted by szr on April 17, 2008, 11:36 pm
Please log in for more thread options
Steven M. O'Neill wrote:
>> Your code is almost exactly what I had. But what is the "$| = 1;"
>> for?
>
> perldoc perlvar | grep '$|'

After reading, I threw this into my linux console (where perldoc
defaults to my 5.8.8 installation compiled from the tarball.)

I noticed the grep didn't return any output. I then attempted using
perldoc from perl 5.10.0 (also compiled from tarball, using the same
options as I did for 5.8.8 if that means anything here) and it did
return the correct text:


$ perldoc5.8.8 perlvar | grep '$|'

$ perldoc5.10.0 perlvar | grep '$|'
$| If set to nonzero, forces a flush right away and after every
buffered by the system or not; $| tells you only whether
youâ?Tve

---------1---------2---------3---------4---------5---------6---------7---------8

I greped a part of that text in perldoc 5.8.8:

$ perldoc5.8.8 perlvar | egrep 'If set to nonzero|buffered by the
system'
$â", If set to nonzero, forces a flush right away and after every
buffered by the system or not; $â", tells you only whether
youâ?Tve

Same thing happens for 5.8.2, 5.8.0, and 5.6.1. Also notice how the line
beginning with "buffered" is offset by two characters, since there seems
to be two extra characters in the first line (where it should be just
$|)

Also, in any version, the "you've" at the end has extra characters as
well.

I've tried using different $TERM's (it's normally xterm) and different
fonts to no avail. In fact the only place it works right is to sit in
from the machine itself and log into a local console. Normally I ssh
into this machine from my main machine. I ssh using Secure CRT 5.5.3.

Yes, I realize this is may be a bit out of the scope of this news group,
but I would like to know if anyone else encountered this problem. I
suspect it is a term/font issue. (and I don't have this problem using
ActiveState 5.8.7 and 5.6.1 in XP PS2.)

Thank you.

--
szr



Posted by Tad J McClellan on April 18, 2008, 7:51 am
Please log in for more thread options
> Steven M. O'Neill wrote:
>>> Your code is almost exactly what I had. But what is the "$| = 1;"
>>> for?
>>
>> perldoc perlvar | grep '$|'
>
> After reading, I threw this into my linux console (where perldoc
> defaults to my 5.8.8 installation compiled from the tarball.)
>
> I noticed the grep didn't return any output.


> I
> suspect it is a term/font issue.


You can eliminate term/font issues by using plain text:

perldoc -t perlvar | grep '$|'


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher0cmdat/"

Posted by szr on April 18, 2008, 1:33 pm
Please log in for more thread options
Tad J McClellan wrote:
>> Steven M. O'Neill wrote:
>>>> Your code is almost exactly what I had. But what is the "$| = 1;"
>>>> for?
>>>
>>> perldoc perlvar | grep '$|'
>>
>> After reading, I threw this into my linux console (where perldoc
>> defaults to my 5.8.8 installation compiled from the tarball.)
>>
>> I noticed the grep didn't return any output.
>
>
>> I
>> suspect it is a term/font issue.
>
>
> You can eliminate term/font issues by using plain text:
>
> perldoc -t perlvar | grep '$|'

Thank you, that does the trick.

--
szr



Posted by Ted Zlatanov on April 18, 2008, 2:51 pm
Please log in for more thread options

TJM> You can eliminate term/font issues by using plain text:

TJM> perldoc -t perlvar | grep '$|'

This can be made permanent by setting the environment variable PERLDOC
to '-t' and then using perldoc as usual.

Ted

Posted by Joe Smith on April 20, 2008, 2:33 am
Please log in for more thread options
szr wrote:

> $ perldoc5.8.8 perlvar | egrep 'If set to nonzero|buffered by the
> system'
> $â", If set to nonzero, forces a flush right away and after every
> buffered by the system or not; $â", tells you only whether
> youâ?Tve
>
> I've tried using different $TERM's (it's normally xterm) and different
> fonts to no avail. In fact the only place it works right is to sit in
> from the machine itself and log into a local console. Normally I ssh
> into this machine from my main machine. I ssh using Secure CRT 5.5.3.

That's what happens when $ENV='en_US.UTF-8' and Secure CRT
is set to "Character encoding: OEM" or anything but UTF-8.

Either 'setenv LANG en_US' or change the character encoding in Secure CRT.

        -Joe

Similar ThreadsPosted
perldoc perlsec question February 4, 2005, 5:17 pm
Print question January 12, 2005, 12:11 am
How to print question April 17, 2008, 10:47 am
newbie question on output formatting/"pretty" print April 16, 2006, 10:59 pm
(",) Print This! Press [Ctrl][P] Keys To Print... >> http://www.phpbbserver.com/phpbb/viewtopic.php?t=2&mforum=anysubjectchat < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < May 30, 2005, 2:05 pm
regex for chars 192 to 255 February 29, 2008, 5:45 am
Delete nonprinting chars September 6, 2004, 10:04 pm
Permuting using any number of given chars May 17, 2005, 10:51 pm
Regex for special chars.. April 18, 2006, 10:10 am
parsing UTF-8 chars out of POST data September 8, 2004, 11:00 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap