in reply to how do I get the directory name from the pathnames

use File::Basename
  • Comment on Re: how do I get the directory name from the pathnames

Replies are listed 'Best First'.
Re^2: how do I get the directory name from the pathnames
by devlele (Novice) on Dec 21, 2005 at 16:18 UTC

    I am getting all the pathnames which I mentioned by parsing an xml file and not from the file system. Do you still think that using File::Basename will solve the probelm.

    Please let me know.
      Yes, it will. It works on strings and breaks them into directory, file, extension, etc. It is portable. It is easy.