$pos = length($string);
while (($pos = rindex($string, $lookfor, $pos)) >= $[) {
    print "Found at $pos\n";
    $pos--;
}
