Actually it does work. Perhaps this is not your exact code, perhaps you just think it does not work. Perhaps you have <Name > ie spaces after the token? If this is HTML or even if not s/<\s*name\s*>//ig may be better. Note you don't have a /g so will only do the first instance of <name> in a given string so perhaps that is your issue?
my @ary = qw[<name> <Name> <NaMe> ]; for (@ary) { print; s/<name>/japh!/i; print " $_\n"; } __DATA__ <name> japh! <Name> japh! <NaMe> japh!
cheers
tachyon
In reply to Re: case insensitive matching
by tachyon
in thread case insensitive matching
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |