in reply to Unable to read a file
I assume this is the culprit:
">$dest_dir./result.txt"
What is that dot doing in there?
But yes, you should always check the success of open and handle failures (usually with something like or die "cannot open '$filename': $!").
Or use autodie.
|
|---|