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
- The documentation that came with your copy of perl. As you are on a windows platform, it is available in html format. To find ot you only need to look in the X:\yourpathto\perl\html directory and invoke the file index.html.
- You could also use the command perldoc from a commandline.
- look in the documentation available on this site.
- or at perldoc.com
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.
|