use File::Find; # these should work on any platform : ) use File::Copy; # i'm naming your target directory hash %files, # and the directories are $target and $source (strings) sub checker { return if exists %files, $_; copy "$target$_", $File::Find::name; } find {wanted => \&checker}, $source;