in reply to Re: Failed to open file for write
in thread Failed to open file for write

Actually they aren't. Perl doesn't interpolate single quoted strings. The actual issue is that OP defined a file for output and is then trying to tack a filename onto the end of it and open it for writing, ie 'D:\research\audit fee models\filings\filenames\filenames.txt'.'/'.$filename

No idea about Linux, but this doesn't work in a Windows world