perl 获取目录信息

 

 1 #!/usr/bin/perl -w
 2 use strict;
 3 use FindBin qw($Bin $Script);
 4 
 5 my $rp=$Bin;
 6 print "the script dir:$rp\nscript name:$Script\n";
 7 
 8 use Cwd qw(abs_path getcwd);
 9 my $abs=abs_path(getcwd());
10 print "current path is:$abs\n"

 

posted @ 2020-11-20 11:34  天使不设防  阅读(172)  评论(0编辑  收藏  举报