in reply to Error Correction

If skipping blank lines is okay, use next at the top of the while loop:

while(<CONF_ID>){ next unless /\S/; ... }

That is, unless the line contains a non-whitespace character, jump to the next iteration of the loop.

As for cleaning up your code, you have a lot of duplication and near duplication, especially reading your templates. If you factored that code out into a subroutine, you could make your program shorter. Of course, you could also skip re-reading the templates for every line of input, which would make your program faster.

To do that, you need to extract other subroutines which only do one thing: read a file into a data structure, perform a substitution for every line of a data structure, write out a data structure to a file. Your code will be easier to read and modify because each individual unit has a descriptive name and a single, identifiable purpose.

Style-wise, eschew global filehandles in favor of lexical filehandles and get rid of the prototype on getDate(). If you do the latter, you can drop the Perl 4-style invocation. Other than that, you use more parentheses than I would, which is mostly a matter of familiarity with Perl, so don't worry about that for now.