Why do you need to "quotemeta" $xmlline? On the lefthand-side of the match this should not be needed.
Without the files it is difficult to develop more ideas, the logic seems ok. I would add a print statement just before the match to see the contents of $cleanedDomain and $cleanedXML.
I agree with comments above that you should revisit your open/close policy.
In reply to Re: RegEx Matching, Loop Breaking...
by hdb
in thread RegEx Matching, Loop Breaking...
by rardoe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |