Help for this page

Select Code to Download


  1. or download this
    my @dirs = grep { -d "$base/$_" and $_ ne "." and $_ ne ".." } readdir
    +(DIR);
    
  2. or download this
    my (@dirs,@files) = grep 
       { -d "$base/$_" and $_ ne "." and $_ ne ".." }
       { -f "$base/$_" } 
       readdir(DIR);
    
  3. or download this
    my @all = readdir(DIR);
    my @dirs = grep 
       {-d "$base/£_" and $ne "." and $_ ne ".." } @all;
    my @files = grep 
       {-f "$base/£_" } @all;