|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re^2: Merging text fileby aaron_baugher (Chaplain) |
| on Sep 06, 2012 at 16:01 UTC ( #992129=note: print w/ replies, xml ) | Need Help?? |
|
The larger the files are, the more likely that slurping them into arrays will be a bad idea. Since we have no reason to think that's necessary, and his example keeps them in the same order as fileA (which a hash would lose), it makes more sense to read them line-by-line:
Of course, since he wants a CSV file, he may need to watch out for commas or quoting in his data. If it has none of that, he's safe. If it does, he may be better off building the output file with something like Text::CSV. Aaron B.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||