http://qs1969.pair.com?node_id=1208980


in reply to Re^2: creating qr from existing regex
in thread creating qr from existing regex

Yes, "(?:$flags:$pattern)" is wrong, it should have been "(?$flags:$pattern)". That is: the flags between the leading "(?" and ":" of the standard non-capturing grouping parens, i.e. "(?:$pattern)".

You can always try to print out a qr/foo/i, to see what perl does natively.