I like the idea of just warning, in case only one of the files can't be written. | [reply] |
unless (open my $fh, '>', $fname) {
warn "Cannot open $fname - $!\n";
next;
}
In case of error we have to rerun the script after fixing the reason. In this sense there is no difference between 'die' and 'warn' version. But 'die' version is smaller -> "small is beautiful" | [reply] [d/l] |
Ah, I see where you are coming from.
In my world, the error would more likely be in the form of having one of the filenames be impossible to use (such as having a colon or a subdirectory that doesn't exist, that sort of thing) but to be of the most service to me personally, the remaining files on the command line should still get created. The only correction then is to run again with just the one corrected filename.
| [reply] |