As it is, your code assumes that the two input files have matching elements in matching order. Do you know that the two files are already sorted in the same way, and actually have matching contents?
It looks like you tried to include sample data in your post. Please edit that to put "code" tags around the data. In fact, you could include an adequate sample of data as part of your posted code, like this:
Of course, if there are supposed to be two different input files, I think only one of them can be "faked" with the __DATA__ trick, and you'll need to post a separate "code" block for the other data file.(start with a <code> tag, of course, or just <c>) # your sample code # goes here… (but please just include what you're actually using) # when it's time to read the sample data in your code, do this: while (<DATA>) { # do stuff with the sample data } # more code… enough to exit cleanly with coherent output… __DATA__ your sample data goes here… (don't forget the closing "code" tag…)
In reply to Re: Need Help with Maybe a Regex Issue
by graff
in thread Need Help with Maybe a Regex Issue
by sharkbait
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |