html2perlstream - convert an HTML document to Perl code for that document


    html2perlstream [options] -
    html2perlstream [options] file.html .. file.html


Takes an HTML file, and produces from it a Perl script that will generate that HTML using the HTML::Stream module.

For usage, just say:


The normal form is:

    html2perlstream [-options] [files]

Any named HTML input file file.html will cause output script to be generated. To read from the standard input, specify '-', like this:

    html2perlstream - < test.html

If reading from the standard input, the output Perl code goes to the standard output. So if you want to run it right away to see the output, just do this:

    html2perlstream - < test.html | perl



Automatically load and run the output Perl file, then do a diff on that and the input file (you must input from a file and output to a file in order to use this).

    html2perlstream -w -d testin/test.html

You'll get fewer differences if you build the code with -w.


Try to generate code which will output all whitespace between tags verbatim. The default code only outputs whitespace if it is believed to be needed; e.g., if we are inside a PRE environment.


To run this, you need:



$Id: html2perlstream,v 1.10 2001/08/17 00:50:00 eryq Exp $


Eryq, 11 Jan 1997, or thereabouts.

Thanks (independently) to Tony Cebzanov and John Buckman for suggesting that I write a tool like this.