Help for this page

Select Code to Download


  1. or download this
    unless (opendir(DIR,$scandir)) {
          confess "can't open the directory $scandir: $@";
    }
    @files=grep {-f "$scandir/$_"} readdir(DIR);
    
  2. or download this
    chdir ($scandir);
    opendir(DIR,'.');
    @files=grep {-f $_} readdir(DIR);