Help for this page

Select Code to Download


  1. or download this
    opendir(DIR, "/tmp") || die "can't opendir $!";
    while (my $file = readdir(DIR)) {
    ...
      print $file."\n";
    }
    closedir DIR;
    
  2. or download this
    my $fname = "/tmp/test.txt"; 
    print $fname if(-e $fname);