in reply to Re^4: Read files not subdirectories
in thread Read files not subdirectories

You are trying to open a file handle to directory

open (my $outfile_hand, '>', $write_dir

Try

open (my $outfile_hand, '>', $write_dir.'/clean.txt'
poj