use strict; my %Column = ('TableName' => 'MyTable', 'Date' => '12-3-1979'); my $Template = join('', ); $Template =~ s/%%(.*?)%%/$Column{$1}/g; print $Template; __DATA__ ** FastLoad Script for %%TableName%% ** ------------------------------------------------------------------------------------------------------------------- ** Generated by LoadGen ** ------------------------------------------------------------------------------------------------------------------- ** What | Who | When | Why ** ------------------------------------------------------------------------------------------------------------------- ** 1.00 | %%Author_Initials%% | %%Date%% | Original Version ** -------------------------------------------------------------------