in reply to concatenate directories and files into one csv

Rules for using open:

  1. Always use the 3 parameter version of open
  2. Always use locally scoped lexical file handles
  3. Always check the result

The template is:

open my $inFile, '<', $filename or die "Failed to open $filename: $!\n +";

Omit the newline in the die if you want to show the line number where the open failed.


True laziness is hard work