The documentation for File::Basename says
NOTE: "dirname()" and "basename()" emulate the behaviours, and quirks,
of the shell and C functions of the same name. See each function's
documentation for details.
What are these quirks?
The documentation for File::Basename says
NOTE: "dirname()" and "basename()" emulate the behaviours, and quirks,
of the shell and C functions of the same name. See each function's
documentation for details.
What are these quirks?
The quirks are documented in the man
pages for each function:
man dirname
DESCRIPTION
Print NAME with its trailing /component removed; if NAME contains no /'s, output '.' (meaning the current directory).
EXAMPLES
dirname /usr/bin/sort Output "/usr/bin". dirname stdio.h Output ".".
man basename
DESCRIPTION
Print NAME with any leading directory components removed. If specified, also remove a trailing SUFFIX.
EXAMPLES
basename /usr/bin/sort Output "sort". basename include/stdio.h .h Output "stdio".