in reply to Re^4: Check if file exists in multiple directories
in thread Check if file exists in multiple directories

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.