开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜