caller(0) returns info about _format_caller's caller.
caller(1) returns info about f's caller
caller(2) would return info about the main program's caller, but that's no longer in Perl. What are you expecting it to return?
that is, caller 0 says "who I am", i.e. which function is invoking caller
No, you are incorrect.
caller() doesn't return which 'function' calls you - it returns the package name, the file name and the line number of the caller; which is in the first three arguments. All the other arguments have to do how you are called. So, caller(0) returns how you were called as.
If you want to find out which function called you (if there is such a function), you call caller(1), which gives you information how your caller is called.