in reply to
$variable as regex in s///
Your code worked for me. Maybe there was a typo in the version you actually ran?
Phil
Comment on
Re: $variable as regex in s///
In Section
Seekers of Perl Wisdom