Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: strange output characters from perldoc

by kcott (Chancellor)
on May 01, 2012 at 03:45 UTC ( #968203=note: print w/replies, xml ) Need Help??

in reply to strange output characters from perldoc

G'day dbae,

I have the same problem using Mac OS X 10.7.3 and Perl 5.14.2 with the Mac application Terminal. I've used a number of different OSes over the years and haven't seen this issue previously: this suggests a Mac OS X problem; although, it could be related to just the perldoc implementation on Mac OS X.

I use ANSI escape codes in $PS1 and $PS2 and these seem to work perfectly. From my .bash_profile:

PS1='\[\033[0;36m\]\u@\h: \w\n\$ \[\033[0m\]' PS2='\[\033[0;36m\]> \[\033[0m\]'

While fixing this is on my TODO list, it has a fairly low priority as I tend to use in preference to the commandline perldoc. Looking for a quick fix some months ago, I investigated $TERM values (suggested above) as well as $LANG and $LC_* (locale) values. I didn't find a solution in whatever timeframe I allotted but these are areas I would be researching further in the future: perhaps that's of some use to you.

-- Ken

Replies are listed 'Best First'.
Re^2: strange output characters from perldoc
by Anonymous Monk on May 15, 2013 at 02:02 UTC

    Try looking at your PAGER environment variable. Mine was set to "more" and it was messing up from the output from perldoc (although normal "man" worked fine). I switched PAGER to be "less -R" and now perldoc looks good.

    This is using xterm on FreeBSD, FWIW.

      ++ Thanks! I had less; less -R is a vast improvement.

      -- Ken

      Perfect. This solved my problem too! My term was xterm-256color and man worked fine, although perldoc had escape sequences just like described here. setting my PAGER to less -R solved it for me!!! Thank you!!
Re^2: strange output characters from perldoc
by Anonymous Monk on May 01, 2012 at 06:45 UTC

    although, it could be related to just the perldoc implementation on Mac OS X.

    No, no it couldn't, see for yourself

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://968203]
[ambrus]: But either of these is a big problem in practice, so I'd need to spend like thirty years of my life to solve (a) and five more years to solve (b)
[ambrus]: Corion: yes, CURRENTLY the blackboard is more convenient
[ambrus]: and it's not like I want to ban blackboards anyway
[ambrus]: you already have blackboards and a canvas for projector or overhead transparencies (or positive film slide projector, not used for maths) canvas in the same lecture halls today, and switch in a few minutes between presentations,
[ambrus]: they're only difficult to use together.
[ambrus]: overhead transparencies are a nice convenience by the way that mix the two slides, because you can write them in advance and edit them during the presentation easily. but they're not very much in fasion these days.
[ambrus]: you can even print them.
[Discipulus]: ambrus i'm trying out MremoteNG which wrap putty and rdp and many other things..
[Corion]: ambrus: Yes, ideally you would have the ease of overhead projection transparencies and pens drawing on them, combined with the computer generated slide text...
[Corion]: Maybe the solution would be a tablet (with pens), like the Wacom tablets, but you still need good software and need to know how to operate it well in an interactive setting ;)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2017-09-26 10:28 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (293 votes). Check out past polls.