my %hash = ( vars => 'vars', this => 'this', doink => 'doink', dink => 'dink', ); while() { s/\[([^]]+)\]/$hash{$1}/g; print; } __END__

Some beginning HTML up here

interpolate [vars] when they are

between brackets like [this].

[dink] The ending HTML down here