The little-used rindex function is well-suited, if you don't go with a File::Basename solution. In this case, I can't think of a reason, but there might be some other situation that didn't deal with filenames where you wanted everything after the last some-character.