tags:

views:

56

answers:

1

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?

+1  A: 

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".
Zaid
I believe this question is about the functions of the mentioned `File::Basename` perl module, not the shell programs themself, so their manpages won't necessarily answer that (although in this case they seem to, depending on your vendor).
rafl
@rafl : I understood 'See each function's documentation for details' to mean the shell documentation.
Zaid