my $string = "ACta"; $string = lc(substr($string, 0, length($string)-1)) . uc(substr($string, -1, 1));