phillyfan <> wrote:
> I have a script where I use the print << web_page code.
The "<<" is part of what is called a "here document", documented
in perlop.pod.
A here document is nothing more than an alternative way
of quoting strings.
> I am calling
> functions within the print <<web_page and web_page lines.
> pop_list("proptype", $proposal[10]); # this is where the hangup is it
> shows this instead of perfoming the function
The same as if you had used some other form for your quoting:
print qq(pop_list("proptype", $proposal[10]));
> When looking at the webpage created, the function code shows, example
> -- pop_date("off", $proposal[3]);
Your example does not match your code...
> shows instead of the information
> the function should show.
Scalars and arrays are interpolated in double-quotish strings.
Function calls are not interpolated.
> I would rather use the print << web_page
> code instead of print for every line. Please advise.
perldoc -q string
How do I expand function calls in a string?
But that "solution" is too ugly to look upon, so I advise putting
the result of the function call into a variable that will interpolate:
my $popped_date = pop_list("proptype", $proposal[10]);
print <<STUFF;
...
$popped_date
...
STUFF
--
Tad McClellan SGML consulting
Perl programming
Fort Worth, Texas