Help for this page

Select Code to Download


  1. or download this
    #### Need to keep this code unchanged
    opendir DIR, "Whatever/path";
    @files=grep { !/^\.+$/ } readdir(DIR);
    closedir DIR;
    
  2. or download this
    #### Need to keep this code unchanged
    opendir DIR, 'Whatever/path' or die "Cannot open 'Whatever/path' $!";
    my @files = map "Whatever/path/$_" grep !/\A\.\.?\z/, readdir DIR;
    closedir DIR;