in reply to Removing filename from directory paths (was: URL Help)
Check File::Basename. It can return the path and the filename.