Here is a pointer: Instead of printing the data, store it in a data structure that is declared outside the outer foreach loop. Then when you are done with all input files, write the output into a single file.
If you haven't yet worked with nested data structures in Perl, I can recommend perlreftut, perldsc and perllol (the latter for arrays of arays).
In reply to Re: Appending new column data to CSV file?
by moritz
in thread Appending new column data to CSV file?
by rnaeye
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |