in reply to Failed to open file for write
you've found your problem and its solution by now, but just two debugging tips that may help you in the future.
Your error message could be improved by replacing the bare filename with the full name with path, and also by printing the $! special variable which will tells you the error reported by the operating system. So, something like this:#Open the output file for saving the results; open my $fh_out, '>', $write_dir.'/'.$filename or die "failed to open '$filename' for write";
would probably have led you to find the error by yourself.my $full_filename = $write_dir.'/'.$filename; open my $fh_out, '>', $full_filename or die "failed to open $full_filename for write $!";
|
|---|