I put about as much effort into my answer as you have into your question, and your answers to requests for further information.

As you seem incapable of reading documentation, I'll hold your hand a little further. This loop will execute exactly three times regardless of the values of any of the variables involved.

for ($i = 0, $i < @InFileNames, $i++) {

During the first iteration, $_ will be set to 0 (zero). During the second it will be set to either 0 or 1, most probably 1 unless @InFileNames is empty. The third iteration $_ will be set to 1.

The value of $i will be zero for the first two iterations and 1 for the third.

Similarly, this loop will also execute exactly 3 times regardless of the values of the variables involved

for ($j = 0, $j < @OutFileNames, $j++){

Again, $_ will take the values 0, 0|1, 1 during the three iterations. The value of $j will be 0, 0, 1 for those 3 iterations.

It is pretty certain that this is not your intention. All the information regarding what is wrong, and how to put it right is available in

If you had taken the constructively intended advice I offered, and looked up the syntax of for loops, I wouldn't have to be pointing these mistakes out to you.

As for my tone........on my screen, it is black on white, any other tone you infer from the way the text is displayed on your screen is beyond my control.


Examine what is said, not who speaks.
1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
3) Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke.

In reply to Re: Re: Re: Re: Need help with subdividing SGML files by BrowserUk
in thread Need help with subdividing SGML files by DukeLeto

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.