in reply to Replace the last letter

Anonymous Monk,
The following code should do what you want provided that $find string is present in $string.
substr( $string, rindex( $string, $find ), 1, $replace );
You can use perldoc -f <function> to find out how substr and rindex work. You can also experiment to see what happens if $find isn't in the string.

Cheers - L~R