in reply to Re^2: reading files from a directory
in thread reading files from a directory
The recommendation these days is to use the three argument form of open, lexical filehandles rather than package filehandles (i.e. $fh rather then IN) and to check for the success of the operation, showing the O/S error ($!) in the error message on failure.
... my $inputFile = q{/path/to/myFile; open my $inputFH, q{<}, $inputFile or die qq{open: < $inputFile: $!\n}; ...
I hope this is helpful.
Cheers,
JohnGG
|
|---|