开发者

In Perl,is there a keyword that means the directory that the current source file is in? [duplicate]

开发者 https://www.devze.com 2023-03-21 11:33 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: In Perl, how do I get the directory or path of the current executing code?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

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

Not the current working directory,bu开发者_如何学运维t the directory that the source being interpreted is in.

In PHP it's the __DIR__ keyword, is there such a thing in Perl?


There are a few different sources for this. You can try $ENV{PWD}, or use the Cwd module:

use Cwd;
my $cwd = getcwd;
0

精彩评论

暂无评论...
验证码 换一张
取 消