How can I walk through two files simultaneously in Perl?
- by Alex Reynolds
I have two text files that contain columnar data of the variety position-value, sorted by position.
Here is an example of the first file (file A):
100 1
101 1
102 0
103 2
104 1
...
Here is an example of the second file (B):
20 0
21 0
...
100 2
101 1
192 3
193 1
...
Instead of reading one of the two files into a hash…