in reply to matching constants within a regular expression?

Two problems with your code The correct (i.e. no syntax errors, I can't vouch against logic errors) code is:
print "attribute 0=\t$1\n" if m/${\ATTRIBUTE_0}='(.*)'/; print "attribute 1=\t$1\n" if m/${\ATTRIBUTE_1}='(.*)'/;