Help for this page

Select Code to Download


  1. or download this
    opendir(D, "test");
    while ( $file = readdir(D) ) 
    {
    ...
        print ($file ? "true" : "false");
        print "\n";
    }
    
  2. or download this
    # this is php, not perl!
    $d = opendir('test);
    while (false !== ($file = readdir($d))) { 
    ...
        print ($file ? "true" : "false");
        print "\n";
    }