This might sound fairly simple, but here goes, and I will try to explain to the best of my knowledge.
I need to make a simple perl script, the script needs to take a .txt file, with the name that I choose at the time of coding, lets name the file mytextfile.txt for the time being. So, the script would take the information from the text file and place it into a properly formatted HTML file, one that is simple <html><head><title>Title</title><head><html>
and then
<body> and insert the proper
where is finds a break it lines. Hopefully that is fairly simple enough to explain. The next question that I would like to know is does anyone know how I could possibly do a word count and if possible search out some certain words that I have chosen, say, the word "the" and either possibly change every instance of the word to a different color or perhaps to a bold or an italic.
If any of you can help me with this I would greatly appreciate it.
Thanks,
P.S. All the input files and words that I would like to change would be hard coded no need to be able to change them on the fly. And if you could tell me how to recognize line breaks and things like that or give me a quick explanation on it it would be greatly appreciated.
Thanks again
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.