chdir($outdir) or die "Unable to chdir to '$outdir': $!\n";
Most likely your first chdir() is failing.
-sam
In reply to Re: perl & UNC paths by samtregar in thread perl & UNC paths by Anonymous Monk