In Perl, how do I get the directory or path of the current executing code?

Posted by Ross Rogers on Stack Overflow See other posts from Stack Overflow or by Ross Rogers
Published on 2010-03-08T17:42:00Z Indexed on 2010/03/08 17:51 UTC
Read the original article Hit count: 190

Filed under:

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?

© Stack Overflow or respective owner

Related posts about perl