Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: How to open file inside loops with file names generated using an array?by Athanasius (Archbishop) |
on May 28, 2018 at 07:35 UTC ( [id://1215291]=note: print w/replies, xml ) | Need Help?? |
Hello skooma, choroba got in ahead of me, but another possibility is that your nested loops are generating more filenames than you actually have files. In the example given, your array @data1 will contain 1.1 and 1.2, and the array @data2 will contain 2.1 and 2.2. But your nested loops will then generate four file names:
Do all of these files exist in the folder? If not, that would explain the “No such file” errors. Hope that helps,
In Section
Seekers of Perl Wisdom
|
|