Consult perlman:perlre for more details.s/\b($old)\b/(lcfirst($1) eq $1) ? lcfirst($new) : ucfirst($new)/gei;
Update:
I think I may have mis-interpreted the question. It has been since corrected, and the difference turned out to be slight.
In reply to Re: Case-preserving substitutions
by jryan
in thread Case-preserving substitutions
by wasii
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |