in reply to Regex: Case insensitive search but case sensitive replace

{using corny Get Smart accent} Missed it by that much.
Anyway, here's mine, using /i switch:

perl -le '$t="John is following jane"; $t=~s/(jane)/##$1##/i; print $t +' John is following ##jane## $perl -le '$t="John is following Jane"; $t=~s/(jane)/##$1##/i; print $ +t' John is following ##Jane##