in reply to Bug? in File::Basename
It's the latter. :-)
The relevant portion of the docs is under the explanation of dirname() where it states:
Have a look at how dirname (the unix command) behaves:When using Unix or MSDOS syntax, the return value conforms to th +e behav- ior of the Unix shell command dirname(1). This is usually +the same as the behavior of fileparse(), but differs in some cases. + For example, for the input file specification lib/, fileparse() + consid- ers the directory name to be lib/, while dirname() consider +s the directory name to be .).
So, File::Basename is working as advertised. You should probably be using fileparse() rather than dirname() to get what you want. The docs guarantee that you can concatenate the components returned by fileparse() and get back the original filename.$ dirname foo/bar foo $ dirname foo/bar/ foo $ dirname foo/bar/. foo/bar
-sauoq "My two cents aren't worth a dime.";
|
|---|