Help for this page

Select Code to Download


  1. or download this
      my @files = `ls $dir`;
    
  2. or download this
      my @files;
      {
    ...
          @files = grep {!/^\./} readdir $dh;
          closedir $dh;
      }
    
  3. or download this
        my $info = do {local (@ARGV, $/) = $file; <>};  # Cryptic
        
    ...
            $info = <$fh>;
            close $fh;
        }