in reply to Re: Regex stored in a scalar
in thread Regex stored in a scalar

It would be better to quote the pattern with qr// rather than using /o. Like this:
$regex = qr/$regex/

Replies are listed 'Best First'.
Re^3: Regex stored in a scalar
by Laurent_R (Canon) on Aug 22, 2015 at 11:35 UTC
    Yes, you're probably right, ++, this was just a quick additional note for speed, not much to to with the OP question.