in reply to parsing a path
I'd recommend using perlman:File::Spec instead. (See also File::Spec.) (: