#### use File::Basename; use strict; use warnings; print dirname('c:\some\path\notreal.txt');