if ( ! -d "$copy_to/$dir" ) {
warn "Cannot copy/zip $src because $copy_to/$dir does not
+exist\n";
next;
}
opendir( $dh, $src );
...
Update: on closer inspection, I realize that you really are not checking for failure in that eval block:
eval { mkpath (["$copy_to/$dir"]); 1}
That always returns true (because of the "1" at the end) regardless of return value from mkpath. In other words, there's no need for the eval at all, because you are defeating its purpose with the final "1". |