I think kennethk is probably right about what may be causing your issue.
However, I'd like to offer a tip on debugging. The Data::Dumper module is a very handy tool in debugging. If you encounter a problem with regular expression's with variables not matching as you want, try using Data::Dumper (or a simple print) just before the regex to find out for sure what is being stored in the variable(s). If the variable(s) don't have what you think they should, then you know where to begin to look for the source of the problem.
In reply to Re: help requested with collating data from two files
by dasgar
in thread help requested with collating data from two files
by Angharad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |