OK, confession time. Still a newbie. Hashes scare me. I am still struggling with getting my head around the basic concept of hashes, and have sat through several bad explanations of what they are(and have the cranial stretch marks to prove it). But your example code above helps a fair amount. Still and all, I can't say that I exactly understand what is taking place, except from your output, it's what I am after. Which is fantastic of course.
But secondly, I am running this script on about 430+ files. So listing them as you have in the braces would be a bit problematic. I have the list of text files in an array @textfile, which I get from:
@textFile = `cat textfiles*.txt`;
I do some line by line processing on the first few lines of each file, and then the rest of the file winds up in the array @ThisFileArray. At this point, it's just paragraphs of text, which I am trying to wrap with the paragraph formats. If I can use my array of text file names @textfile inside the braces, it would appear that would be a better way to get the list of file names into the code structure. Then I need to stare long and hard at your code to better understand what takes place there.
It would seem that I could change your
my @files = qw{file1.txt file2.txt};
To my @textfile;, and go from there. I just have to understand what going from there entails, and where I would be going.
I really appreciate your help and support with all this, and it will go a long way to help me realize my efforts to put together a clean, cool looking website.
Thanks very much for your time and efforts to help me out.
Mark
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.