Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

How can I convert Perl code into HTML with syntax highlighting?

by Massyn (Hermit)
on Jun 16, 2002 at 03:06 UTC ( #174891=perlquestion: print w/replies, xml ) Need Help??

Massyn has asked for the wisdom of the Perl Monks concerning the following question: (data formatting)

How can I convert Perl code into HTML with syntax highlighting?

Originally posted as a Categorized Question.

  • Comment on How can I convert Perl code into HTML with syntax highlighting?

Replies are listed 'Best First'.
Re: How can I convert Perl code into HTML with syntax highlighting?
by ChemBoy (Priest) on Jun 16, 2002 at 03:12 UTC

    Use Perltidy's HTML formatting options (-html etc.) As shown in the Perltidy manual, you can generate a whole page or a simple preformatted section, with embedded or linked style sheets, and set different colors for all manner of different constructs.

Re: How can I convert Perl code into HTML with syntax highlighting?
by yodabjorn (Monk) on Jun 16, 2002 at 08:17 UTC

    vim can do it.

    :runtime! syntax/2html.vim
    To view the help page:
    :help 2html
    Details are in the vim help under "convert-to-HTML".

Re: How can I convert Perl code into HTML with syntax highlighting?
by epoptai (Curate) on Jun 17, 2002 at 04:06 UTC

    Code2HTML is a free Perl script that syntax highlights 15 different programming languages.

Re: How can I convert Perl code into HTML with syntax highlighting?
by choroba (Archbishop) on Aug 12, 2010 at 17:56 UTC
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://174891]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2021-04-10 13:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?