in reply to Using variable in regular expression
It's OK, I know what was wrong. I had quoted the regular expression that contained a qr. i.e. I had "qr/def/m" instead of $regexp = qr/def/m Thanks