perl 遍历当前路径下的文件夹,去除掉隐藏路径

    科技2024-08-01  27

    #!/usr/bin/perl -w use Cwd; my $path_curr = getcwd; opendir (DIR,$path_curr): my @filelist = readdir(DIR): my @dirlist = (); foreach $files (@filelist): if(($file eq '.')||($file eq '..')){ next; } else{ if(-d $file){ $dir_name_path = $path_curr."/$file": push @dirlist, $dir_name_path; } }
    Processed: 0.011, SQL: 8