my $str = "a string"; print substr($str, -1); __output__ g