in reply to
Regex stored in a scalar
What is in $regex?
try
$line =~ /$regex/;
[download]
The way forward always starts with a minimal test.
Comment on
Re: Regex stored in a scalar
Download
Code
In Section
Seekers of Perl Wisdom