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.
In reply to Re^3: How to generate the .doc file for each row from a csv file
by hdb
in thread How to generate the .doc file for each row from a csv file
by perladdict
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |