The stupid question is the question not asked | |
PerlMonks |
help requested with collating data from two filesby Angharad (Pilgrim) |
on Sep 13, 2010 at 20:47 UTC ( [id://860029]=perlquestion: print w/replies, xml ) | Need Help?? |
Angharad has asked for the wisdom of the Perl Monks concerning the following question:
I have two files - one which looks like this (FILE1)
...etc and another that looks like this (FILE2) ...etc I'm wanting to match the first three numbers from the 4 number strings in FILE2 (each number being separated by a '.') with the corresponding three number strings in FILE1 and then count how many matches there are. For example for the three number string 1.10.10 in FILE1 there are 3 matches in FILE2. I want the output file to look like this: I've got the following script But its simply not working properly - its not finding all the matches. I've given only example files here - the actual files are much bigger - some matches are recognised but not all. Any pointers in the right direction much appreciated!!!
Back to
Seekers of Perl Wisdom
|
|