in reply to Why does /i not seem to work

are you aware that the regex object has it's own flags?
DB<3> $r="abc|xyz"; DB<4> $rx=qr($r); DB<5> p $rx (?^u:abc|xyz)
DB<6> $rx=qr(/$r/i); # strike it, see update DB<7> p $rx (?^u:/abc|xyz/i)

update

Sorry line 6 had the wrong syntax

DB<27> $rx = qr($r)i; # or traditionally qr/$r/i DB<28> p $rx (?^ui:abc|xyz) DB<29> p "XYZ" =~ $rx 1

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice