Can you add a use strict; at the beginning of your code? And where do you assign a value to $newdirectory? As the code stands it is undefined and therefore your target directory is not specified.
The chomp should be placed before the loop.
In reply to Re^5: Check if file exists in multiple directories
by hdb
in thread Check if file exists in multiple directories
by Bama_Perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |