index rindex
substr:my $part = substr($string, $initial_position, $length);
//可为负数,最后-1。-2 -3...
my $string = "Hello, world!";
substr($string, 0, 5) = "Goodbye"; #string: "Goodbye, world!";
( my $previous_value = substr($string, 0, 5, "Goodbye"); )