Dear CountZero,

Thanks for the modifications you've made to your script, and so promptly, I am quite thankful to you

The one thing I suppose that is still a little different from the output I'd first described is that for each row of the primary input file, I want in the output, additionally, ONLY 3 additional columns for EACH secondary input file.

So if there are 3 secondary files, that would be 3*3=9 additional columns added per every row of the primary file. If there are only 2 secondary files, add 2*3=6 additional columns per every row of the primary file. This will make a grid rather than a running list. The grid is way easier to use, and also compatible with MS Excel that some other folks at work use...

The one thing that therefore has to be changed in this script is to quote 'absent 0 0' JUST ONCE if all instances in the secondary files are absent. And similarly, quote ONLY 'present $start $end' when there is a range match, and not to worry about including absent 0 0 IF there is a match within primary range

To make that rather abstract explanation above easier to understand, let me take your output example and change it to what I am hoping to get as the final output:

--Checking primary.txt to ./secondary_1.txt and .secondary_2.txt--

Alex: 3 44 absent 0 0 absent 0 0

Alex: 124 175 present 134 155 present 154 174

Barry: 2 44 present 12 24 absent 0 0

Drew: 9 43 absent 0 0 present 19 54

James: 6 45 absent 0 0 present 29 45

I think I did a pretty average job of describing the output in previous postings. Does this sort of make sense now?

Thanks in advance, once again, CountZero, and I will now look into learning the modules that you have referred me to in your earlier postings.


In reply to Re^4: multi column multi file comparison by onlyIDleft
in thread multi column multi file comparison by onlyIDleft

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.