in reply to foreach and if inside <<ENDHTML? Can they work?
A heredoc like you show interpolates perl variables (scalars and arrays) but does not evaluate perl expressions. The same rules as qq() or double quotes apply.
If the heredoc tag is introduced in single quotes, no interpolation is done at all.
You can get snippets of code to run by faking the interpolation into evaluating a reference by way of, say,
print <<EOT; @{[map {foo($_)]} @list]} ${\bar($text)} EOT
After Compline,
Zaxo
|
|---|