I have a simple question for which I am having difficulty finding an answer. It is this:
How do you call a function from within a HERE doc?
Here is an example of what I mean:
return strftime("%D %r",localtime);
my $var_day = datestamp();
Variable interpolation works - Instead of the literal
text seen here, this variable's value is printed.
But how do you do "function" interpolation?
The next line prints itself literally, instead of
being substituted with the function's return value.
Is there some other way of writing this that does what I want?
I hope the example is sufficiently clear. I must admit that I hesitate to put forth a question that seems as if it should have such a simple and straightforward answer. However, I find myself unable to attain any such enlightenment on this issue, regardless of where I look. Though I sure the blame lies with my too modest research skills, any help will be most appreciated.