Perl script to take a CSV file and a template and apply the template to each row of the CSV