Help for this page

Select Code to Download


  1. or download this
    
    opendir(DIR,"/some_dir") or die "Cannot open directory: $!";
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    opendir DIR, '/some_dir' or die "Cannot open directory: $!";
    my @files = grep !/^.$/, readdir DIR;
    closedir DIR;