http://www.perlmonks.org?node_id=983870


in reply to finding the last occurence of substring in string

Just for the sake of TIMTOWTDI (or fun, or for following Matthew 20:16), you may apply the following algorithm:

Rata

Replies are listed 'Best First'.
Re^2: finding the last occurence of substring in string
by RichardK (Parson) on Jul 27, 2012 at 10:20 UTC

    if you want to get the reverse index why not just use rindex ? :)