in reply to Re: Regex variables with delimiters
in thread Regex variables with delimiters

I would suggest that you not use perl. grep has built in switches to handle exactly this case.

Except, of course, in the very common case that this code is part of a larger script or chain of processing, in which case calling grep as an external program has more disadvantages than just doing everything in Perl.