in reply to Getting regexp from Regexp references
You can actually use the string you're getting as a regex... The (?imsx-imsx:...) syntax can be used within a // construct to enable/disable the modifiers that are normaly placed outside the //'s.
This syntax is actually encouraged in the perlre manpage for usage with dynamic patterns, which is exactly what you seem to be dealing with.
And the 'compiled' regexes that qr returns can be used in another regex, so you should be able to just plain join them with '|', and qr the result...
|
|---|