more useful options | |
PerlMonks |
Re: Looping in a Loopby VinsWorldcom (Prior) |
on Sep 16, 2014 at 13:39 UTC ( [id://1100763]=note: print w/replies, xml ) | Need Help?? |
UPDATE: Athanasius beat me to the punch with both a 'welcome' and a better 'Perl-ish' solution! Violet, first off, welcome to the Monastery and to the wonderful world of Perl programming. First off, start all your scripts with 'use strict' and 'use warnings', that will help you catch many errors and incorrect or troubling syntax that may impact your output and obfuscate troubleshooting. You should use the three-argument 'open' for better security in your code. The main problem I see is that you operate on FILE while in the LIST loop. You should do the operations on FILE outside the LIST loop. I've provided reference below that works on a small test data set I made up (assuming what your input files look like based on your question and code).
In Section
Seekers of Perl Wisdom
|
|