in reply to matching special char
I assume you aren't using use strict; use warning;. If you were, you'd probably get errors on the regexp.