Thanks to you for all your suggestions. I've started teaching myself PERL since 3 weeks, and had never come across the need to process multiple input files. Based on your responses, am I right in understanding the following?
1. I do NOT have to open as many file handles as the number of ARGV elements from command line?
2. I can build a merge of the lists in each input file into one held in memory and not an actual file
3. It is possible to compare this merge list in memory to the individual file lists from input? <\p>
Except I do not still understand how to do this comparison when opening multiple files with ONLY 1 file handle! I am a little lost here...My understanding is that the final merge list can be compiled only after reading the contents of the last input file, at which time the common file handle is pointing to the last file. So how can a comparison of the merge list to ANYTHING but the last file be made?
I know I am being naive, but I am sure Your Holiness' the Monks will be kind to a new initiate :)
Thanks to all those who wrote down partial and even FULL scripts, it is very sweet and kind of you. Since I am learning and very much a newbie, I would appreciate and benefit much more if you could point out an outline of logic and refer me to the operations/syntax that I should teach mysef to implement the most suitable algo for my work
Also, my example might have been misleading, my input files are not numbered, they have unrelated alphabetical names. And each of the files is not an array, it is more in the format of a 2 column Excel sheet, but as txt file. Entries in each line separated by tab, lines themselves separated by newline
Thanks again, I aspire to be as helpful and patient as all of you, one day! :)
In reply to Re^2: Open multiple file handles?
by Anonymous Monk
in thread Open multiple file handles?
by onlyIDleft
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |