http://qs1969.pair.com?node_id=571281


in reply to what is the difference between index and rindex

Sometimes, an example works best.

>perl -e "print index 'abcdcda', 'c'" 2 >perl -e "print rindex 'abcdcda', 'c'" 4

Reference: index, rindex