in reply to matching special char

Off the top of my head, you should replace the double slash with a single slash.

I assume you aren't using use strict; use warning;. If you were, you'd probably get errors on the regexp.