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