Law of the character string length in Perl

xiaoxiao2021-03-06  73

Perl does not seem to provide a strlen function, and the RINDEX function can also get the length of the string.

$ STR = "ABCD 1234";

$ LEN = RINDEX $ STR. "/ $", "/ $";

Print "$ LEN / N";

Execution: Lenet of 'ABCD 1234' IS: 9

转载请注明原文地址:https://www.9cbs.com/read-93132.html

New Post(0)