$re=qr/foo/i; s/$re/bar/; [download]
s/foo/bar/io; [download]
In reply to difference between qr// and the use of the o modifier ? by arhuman