use File::Spec; my ($vol,$path,$file)=File::Spec->splitpath($path);