Text-to-HTML Converter Script
Let's finish up with a slightly more useful script: webbuild.pl takes a simple text file as an argument, prompts you for some basic values, and then spits out an HTML version of your text file. It's not a very sophisticated HTML generator—it won't handle embedded boldface or other formatting, it doesn't handle links or images; really, it does little other than stick paragraph tags in the right place, let you specify the foreground and background colors, and give you a simple heading and a link to your e-mail address. But it does give you a basic HTML template to work from.
How It Works
In addition to simply converting text input to HTML, the webbuild.pl script prompts you for several other values, including
The title ...
Get Sams Teach Yourself Perl in 21 Days, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.