I was wondering if it was possible to call a function inside a perl here doc
sub Function
{
}
print<<HERE;
Function()
HERE
I was wondering if it was possible to call a function inside a perl here doc
sub Function
{
}
print<<HERE;
Function()
HERE
Do you mean that you want the function's return value to be interpolated into the heredoc?
sub Function {
qw( Hello, World! );
}
print <<HERE;
@{[ Function() ]}
HERE
There are a few potential solutions in the PerlMonks question: Calling a function from within a HERE doc?