I apologize for my previous mixup of use strict and use warnings.
As for where the warnings are coming from, they are being generated by variables within the here document starting at line 349. Any variables inside which have not been previously assigned will give you this warning and report line 349. This includes any keys in the data hash which have not been previously assigned, even if the data hash has been created.
A good way to debug it would be using Data::Dumper as previously suggested for the data hash and manually inspecting any other variables used within that here document.