in reply to File read errors

You should only attempt to use a filehandle if open returned a true value.    Try something like this instead:

foreach my $file ( @files ) { open FH, '<', $file or do { warn "Cannot open '$file' $!"; next; }; my @fileContents = <FH>; close FH; //Do something with @fileContents }

Replies are listed 'Best First'.
Re^2: File read errors
by Anonymous Monk on Jan 14, 2010 at 04:30 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.