perl-5.38.0
rindex STR,SUBSTR,POSITION
rindex STR,SUBSTR

Works just like index except that it returns the position of the last occurrence of SUBSTR in STR. If POSITION is specified, returns the last occurrence beginning at or before that position.

STR 中で 最後に 見つかった SUBSTR の位置を返すことを除いて、 index と同じように動作します。 POSITION を指定すると、その位置から始まるか、その位置より前の、 最後の位置を返します。