How can a package knows which path it is in? For example, I have a "test.pm" in "/www/somedir": package test; sub currDIR { use Cwd; print getcwd(); } and then a "main.cgi" in "/www": require "./somedir/test.pm"; test::currDIR(); running main.cgi will print me "/www" (path to main.cgi), however, I actually want "/www/somedir" (path to test.pm) instead, which command should I use? I'm asking this because I need to open certain files in the package, and those files are stored in the same directory as the package for portability issues. Thank you.