Perl 字符串处理备忘录

2019-10-01 13:03:23王振洲

substr( $str , 4 ,  3) = "xxxxx" ; # $str的值为"123xxxxx7890"

函数的第三个参数指定的是被替换子串的长度,因此不影响新替换的字串的长度。