in reply to Re^2: How to generate the .doc file for each row from a csv file
in thread How to generate the .doc file for each row from a csv file

One comment: you have a single .doc file in for each row in your csv file, so you can assign the filename directly to $doc:

$doc = "C:\\Users\\xxx\\Desktop\\$reportname.doc";

without any need for a loop over @files.