[Perl]如何取绝对路径:FindBin模块和Cwd模块用法和区别
用法:FindBinuse FindBin qw($Bin);my $root_path = $Bin;print "脚本的路径:$root_path\n";Cwduse Cwd qw(abs_path getcwd);my $abs = abs_path(getcwd());print "运行脚本的路径:$abs\n";区别大家一定注意到了"脚本
原创
2014-02-28 16:05:17 ·
11830 阅读 ·
0 评论