in reply to Re^2: Path strings
in thread Path strings
If you're using splitpath to split a path that ends in a directory rather than a file, then you should be using splitdir instead*. That may solve your trailing '/' issue.
I don't think I've ever had to manually add or remove delimiters from paths (with or without filenames) when using File::Spec. If you have specific examples that cause you to jump through hoops, please post them. I'm sure the monks around here will provide several approaches to solving the problem. :-)
*Update: You could use splitpath, but you would need to set the second param to true (or, as you found, add a trailing directory separator). See the docs for more info.
|
|---|