Help for this page

Select Code to Download


  1. or download this
    $dirname = "C:/Perl/Test/"; 
    opendir(DIR,$dirname);
    ...
            print("$file1\n"); 
        } 
    }
    
  2. or download this
    use strict;
    use warnings;
    ...
            print "$file1\n"; 
        } 
    }
    
  3. or download this
    use feature qw/ say /;
    use strict;
    ...
    my @files = grep { -f "$dirname$_" } readdir $dir_handle;
    
    say for @files;