As posters have already said, rindex will work, but there are also regexen.
my $needle = '@'; my $str_index = $text =~ /.*()\Q$needle\E/ && $-[1];
In reply to Re: Index of the last occurence of a character inside a string
by ambrus
in thread Index of the last occurence of a character inside a string
by Krambambuli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |