perl获取当前目录

my $dir=$ENV{'PWD'};

原文地址:https://www.cnblogs.com/yumtaoist/p/5062571.html