chengiz5 has asked for the wisdom of the Perl Monks concerning the following question:

perldoc shows a 2 after marked up strings (NAME2, SYNOPSIS2, OPTIONS2, -h2) with vt220 as terminal. This is on Centos 7 with default perl 5.16.3. Changing TERM to xterm fixed it. However I'm interested in knowing whether anyone can reproduce it and why this happens in the first place. Thanks.
  • Comment on vt220 causes perldoc to print 2 after headings

Replies are listed 'Best First'.
Re: vt220 causes perldoc to print 2 after headings
by footpad (Abbot) on May 22, 2019 at 22:37 UTC
Re: vt220 causes perldoc to print 2 after headings
by hippo (Archbishop) on May 23, 2019 at 08:52 UTC

    Yes, I can reproduce this behaviour on CentOS 7. However, I am not really using a vt220 and therefore by setting TERM to vt220 I am lying to the system about which terminal I am using and it is therefore little surprise that the display is adversely affected.

    If you really are using a vt220 then this sounds like a bug (and well done you for keeping such an ancient terminal in working order for so long). Otherwise, just set the TERM variable to the real terminal type you are actually using.

Re: vt220 causes perldoc to print 2 after headings
by chengiz5 (Novice) on May 23, 2019 at 17:49 UTC
    I had TERM set to vt220 in my bashrc for some "historic reason" that I'm sure is no longer relevant :-). xterm is working for me. Thank you!