use strict; my $header = '$cfg'; my $cfg = 'This is my title'; my $out; eval '$out = "'.$header.'"'; print $out;