in reply to Interpolation of capture buffers not working when regex stored in variable

As an additional suggestion, for this sort of problem, you might also wish to make use of the named capture buffers feature available since Perl 5.10. This way you are not stuck trying to keep brackets in the same relative position for each regexp across many config files. For example, parsing a date:

my $re = qr/(?<yyyy>\d{4})(?<mm>\d{2}(?<dd>\d{2})/; printf "The date was %04d-%02d-%02d", $+{yyyy}, $+{mm}, $+{dd};

If you have to support a different format that is mm-dd-yyyy, for example, you're fine as long as you put the (?<name>...) capture buffers in the correct places.