If I am in some library code, how do I determine the path to the file of the code that is currently executing? I know how to get the path of the top perl file by looking at ARGV, but if I load a library, how can that library know which path it is at?
If I am in some library code, how do I determine the path to
Share
The
__FILE__token will give you the full path including the file name. You can use File::Spec to split it into components: