Help for this page

Select Code to Download


  1. or download this
    opendir (DIR, "C:/temp") or die "unable to open C:/temp $!\n";
    my @files2 = grep{/\.pl$/}readdir DIR;
    print join("\n",@files2),"\n";
    
  2. or download this
    my @files = glob("C:/temp/*.pl");
    print join("\n",@files),"\n";    #full paths
    
  3. or download this
    opendir (DIR, "/root") or die "unable to open /root $!\n";
    @all = grep{-f}readdir DIR;