in reply to HERE-doc two-stage interpolation magic
The following does not:my $foo = "praise"; my $bar = "good"; print <<"HERE"; all $foo the $bar way HERE
If you want multi-level interpolation, you probably want to look into a templating module. Of which there are many on CPAN. (I personally use the template toolkit, but there are many good ones.)my $string = 'all $foo the $bar way'; my $foo = "praise"; my $bar = "good"; print <<"HERE"; $string HERE
|
|---|