Help for this page

Select Code to Download


  1. or download this
    my $dir = '.'
    my @list = glob($dir . '/*'); # <- amended per merlyn's response
    
  2. or download this
    my $dir = '.';
    opendir(my $dh, $dir) or die "Could not open $dir because $!\n;
    @list = readdir($dh);
    
    closedir($dh);
    
  3. or download this
    @list = glob($dir .'/A*');
    
  4. or download this
    my $dir = '.';
    opendir(my $dh, $dir) or die "Could not open $dir because $!\n;
    ...
       # do stuff to $_
    }
    closedir($dh);