in reply to Substitute Question

ASCII space conveniently has only the lowercase-bit set. If tye hasn't told you yet, this is some code to remember and set that bit:
for (<DATA>){ chomp; $case = $_ & ' ' x length; s/old/NEW/i; print $_ | $case. "\n"; } __DATA__ old_word OLD_WORD oLd_wOrd olD_worD
Cheers,

Jeroen
"We are not alone"(FZ)