in reply to Write output of File::Find::find({wanted => \&wanted}, to a file?

There are several ways to achieve the desired result.

One way is to just use redirection and run you program from the command line: program >> output.txt.

Another way would be to change your print statement such that it outputs to your file handle:  print(OUT "$name\n");

Yet another way is to make the OUT filehandle the default using select immediately before you call File::Find::find().

Take your pick