in reply to opened file being overwritten
This is a good time to start always using the three parameter version of open and lexical file handles:
open my $file4In, '<', $fileName or die "Could not open $filename: $!\ +n";
Appending In or Out to your file handles helps as a sanity and consistency check.
You get even more linty goodness if you always use strictures (use strict; use warnings;).
Note too that showing why an open failed often is at least as useful as showing which open failed.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: opened file being overwritten
by davido (Cardinal) on Dec 13, 2012 at 23:01 UTC |