in reply to escaping variables in regexp

The rub is that I am trying to allow the user to specify the delimiters on the command line.

You want to read about \Q and \E in perldoc perlre, or about quotemeta.