G'day miguelnixon.

Welcome to the Monastery.

"... forgive me if this is the wrong forum ..."

No need to seek forgiveness. Feel free to ask any Perl-related questions here. And please don't be dissuaded by thinking you should already know something: I, with apparently more than five years of Perl under my belt than you, asked a perldoc-related question just last week.

I suspect the differences you're seeing are OS-related, not Perl-related. There may be some configuration (or similar) setting you need to change such that "heading." becomes an equivalent with formatting code like ".[1m.[1mheading.[0m.[0m.".

Just to mention some earlier (chronologically) points regarding environment variables:

$ env | grep PAGE PAGER=/usr/bin/less

I do recall using additional options with less years ago when running macOS (aka Mac OS X in earlier versions) but that appears unnecessary with the current OS.

I don't have your OS/Perl combination available. This makes testing your specification installations impossible for me; however, general test scenarios are valid for us both. I do have Perl 5.30 on Cygwin (but nothing as early as 5.22). The following reflects my tests with 5.30 (I repeated these with 5.34 — my usual and latest, currently stable version — but saw no differences).

I wrote pm_11136178_pod_formatting.pod:

=encoding utf8 =head1 Emphases =over 4 =item * Plain perldoc Bold, Italic etc =item * Bold B<perldoc Bold, Italic etc> =item * Italic I<perldoc Bold, Italic etc> =item * Bold Italic B<< I<perldoc Bold, Italic etc> >> =item * Italic Bold I<< B<perldoc Bold, Italic etc> >> =item * Bold Italic Code B<<< I<< C<perldoc Bold, Italic etc> >> >>> =item * Italic Bold Code I<<< B<< C<perldoc Bold, Italic etc> >> >>> =back =cut

Running that through perldoc I get:

Emphases * Plain perldoc Bold, Italic etc * Bold perldoc Bold, Italic etc * Italic *perldoc Bold, Italic etc* * Bold Italic *perldoc Bold, Italic etc* * Italic Bold *perldoc Bold, Italic etc* * Bold Italic Code *"perldoc Bold, Italic etc"* * Italic Bold Code *"perldoc Bold, Italic etc"*

I do note various asterisks and double-quotes to represent emphasis and monospace text; however, there's nothing to differentiate italicised and emboldened text. Did you see something different between 5.22 and 5.30.

Piping the perldoc output through hexdump:

$ perldoc pm_11136178_pod_formatting.pod | hexdump -C 00000000 45 6d 70 68 61 73 65 73 0a 20 20 20 20 2a 20 20 |Emphases. + * | 00000010 20 50 6c 61 69 6e 0a 0a 20 20 20 20 20 20 20 20 | Plain.. + | 00000020 70 65 72 6c 64 6f 63 20 42 6f 6c 64 2c 20 49 74 |perldoc B +old, It| 00000030 61 6c 69 63 20 65 74 63 0a 0a 20 20 20 20 2a 20 |alic etc. +. * | 00000040 20 20 42 6f 6c 64 0a 0a 20 20 20 20 20 20 20 20 | Bold.. + | 00000050 70 65 72 6c 64 6f 63 20 42 6f 6c 64 2c 20 49 74 |perldoc B +old, It| 00000060 61 6c 69 63 20 65 74 63 0a 0a 20 20 20 20 2a 20 |alic etc. +. * | 00000070 20 20 49 74 61 6c 69 63 0a 0a 20 20 20 20 20 20 | Italic. +. | 00000080 20 20 2a 70 65 72 6c 64 6f 63 20 42 6f 6c 64 2c | *perldo +c Bold,| 00000090 20 49 74 61 6c 69 63 20 65 74 63 2a 0a 0a 20 20 | Italic e +tc*.. | 000000a0 20 20 2a 20 20 20 42 6f 6c 64 20 49 74 61 6c 69 | * Bol +d Itali| 000000b0 63 0a 0a 20 20 20 20 20 20 20 20 2a 70 65 72 6c |c.. + *perl| 000000c0 64 6f 63 20 42 6f 6c 64 2c 20 49 74 61 6c 69 63 |doc Bold, + Italic| 000000d0 20 65 74 63 2a 0a 0a 20 20 20 20 2a 20 20 20 49 | etc*.. + * I| 000000e0 74 61 6c 69 63 20 42 6f 6c 64 0a 0a 20 20 20 20 |talic Bol +d.. | 000000f0 20 20 20 20 2a 70 65 72 6c 64 6f 63 20 42 6f 6c | *perl +doc Bol| 00000100 64 2c 20 49 74 61 6c 69 63 20 65 74 63 2a 0a 0a |d, Italic + etc*..| 00000110 20 20 20 20 2a 20 20 20 42 6f 6c 64 20 49 74 61 | * B +old Ita| 00000120 6c 69 63 20 43 6f 64 65 0a 0a 20 20 20 20 20 20 |lic Code. +. | 00000130 20 20 2a 22 70 65 72 6c 64 6f 63 20 42 6f 6c 64 | *"perld +oc Bold| 00000140 2c 20 49 74 61 6c 69 63 20 65 74 63 22 2a 0a 0a |, Italic +etc"*..| 00000150 20 20 20 20 2a 20 20 20 49 74 61 6c 69 63 20 42 | * I +talic B| 00000160 6f 6c 64 20 43 6f 64 65 0a 0a 20 20 20 20 20 20 |old Code. +. | 00000170 20 20 2a 22 70 65 72 6c 64 6f 63 20 42 6f 6c 64 | *"perld +oc Bold| 00000180 2c 20 49 74 61 6c 69 63 20 65 74 63 22 2a 0a 0a |, Italic +etc"*..|

That looks a lot like your 5.22 ouput.

In case you were wondering, Cygwin does support highlighting codes. I can't tell how they might differ. Here's an example:

$ echo $PS1 \[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$

I would investigate the OS versions differences first. Some monks may even have exactly the same combinations of OS and Perl as you; that may help more than I've been able. If you do find that it's an OS issue; please post here for the benefit of others.

P. S. (forgot to mention): I generated HTML output via:

pod2html --infile=pm_11136178_pod_formatting.pod --outfile=pm_11136178 +_pod_formatting.html

When viewed in Firefox the output was exactly as expected. All formatting codes had been correctly translated to the equivalent HTML tags.

— Ken


In reply to Re: perldoc Bold, Italic etc by kcott
in thread perldoc Bold, Italic etc by miguelnixon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.