in reply to How to replace the last 2 characters in a string

Let me re-phrase before I answer the question, in case I don't understand.

"I wan't to replace the last two digits in a string with 67"

In that case:

$string =~ s/\d\d$/67/;

May I suggest perlre and perlretut for more information.