in reply to Re^2: Replace the last letterin thread Replace the last letter
If you always want the last letter, you could match:
$string =~ s/.$/X/; ## or $letter = 'X'; $string =~ s/.$/$letter/; [download]