or more flexibly:s/\b(find)\b/$1 eq uc($1) ? "REPL" : $1 eq ucfirst(lc($1)) ? "Repl" : +"repl"/gie
my %repl = ( find => 'repl', FIND => 'REPL', Find => 'Repl', ); s/\b(find)\b/$repl{$1}||$repl{lc $1}/gie
In reply to Re: Respect case in substitution
by ysth
in thread Respect case in substitution
by b4swine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |