in reply to regex (?{CODE}) question
Why are you using a print command? It seems like all you're trying to do is insert the value of $1.