用perl获取某一文件所在路径,参考代码如下:use Cwd 'abs_path';print abs_path($0)."\n";man CwdNAMECwd - get pathname of current working directorySYNOPSISuse Cwd;my $dir = getcwd;use Cwd 'abs_path';my $abs_path = abs_path($file);