where $new properly reflects the case of the first letter of $old.s/\b$old\b/$new/g;
Given $old="my"; $new="no"; this would transmogrify
My perl is my life.into
No perl is no life.(I can't include patterns in $new.)
thanks much -
Andy
In reply to Case-preserving substitutions by wasii
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |