ok another command question

i know stristr(); can find the first occurance of a character within a string. but how about the last occurance?

ie i have $dir=hosted/blah/blah2

i need it to seperate off blah2 by only looking at the string starting after the last /