in reply to Question about grep

Try File::Basename

Scott