in reply to Interpolating $var in a $string
#!/usr/local/bin/perl use strict; my $name = "Fred"; s/(\$\w+)/$1/eeg foreach my @infile = <DATA>; my $tmpl = join '', @infile; # output print $tmpl; __DATA__ This is my template. Here is my $name [download]