in reply to character location question

Sounds like homework, but here's a tip.
my $i = index reverse($phrase),$what;
updated: ()
meh. that's not good ofcourse. I think this works ok:
use strict; print join(",",rindexes("hello world , kill bill","ll")); sub rindexes { my $s = reverse shift; my $what = reverse shift; my @indexes; my $old = 0; while ((my $i = index $s,$what,$old) > -1) { push @indexes, length($s) - $i - length($what) +1; $old = $i+1; } @indexes; }