Hi all, need some thoughts on this. I am looking to compare and contrast the number of file lines PER folder in each sub-directory on a given base directory. The compare and contrast method is easy enough handled by Tie::File, but how can I loop through each file to only compare it to EACH file in an entire single sub-directory set? For example:
A) Master Directory
AA) Subfolder 1
1) Sub Folder A
2) Sub Folder B
3) Sub Folder C
BB) Subfolder 2
1) Sub Folder A
2) Sub Folder B
3) Sub Folder C
etc...
I want to compare the lines of all files that end in a given extension (like .txt) in each sub folder A-C for each AA or BB subfolder ONLY. So if AA Subfolder 1 has 4 lines of text in each file per each sub-folder there, it is seperated from BB's subfolder comparision.
Hope that isn't confusing. Again I'm not concerned with grabbing the line numbers, that's easy enough through a count of an array, its breaking up each sub-folder into perhaps a while loop to separate it out that's difficult
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.