template.properties -------------------- stree.address=#enter address# city.name=place sate.name=unk current.txt -------------------- street.address=1234_ave_west city.name=seattle state.name=wa ####################CODE############################# open (templateFile, "C:/template.properties") or die "Could not open file: $!"; open (currentValues, "C:/current.txt") or die "Could not open file: $!"; foreach $line () { ($k, $v) = split /=/, $line; foreach $tmpLine() { print $k; if (m/$k/) { print $line; } else { print $tmpLine; } } } close templateFile; close currentValues;