Name

rindex

Synopsis

rindex str, substr, [position]

Description

Works just like index except that it returns the position of the last occurrence of substr in str (a reverse index). The function returns -1 if not found. position, if specified, is the rightmost position that may be returned—how far in the string the function can search.

Get Perl in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.