Kashif Salman wrote:
>
I know I can create html code using CGI and call a subroutine in there
easily but if i were to use a here document for my html code, can I
call a subroutine in there?

print<<END;
HTML code
                    <--Can I call foo() in here somehow?
END

sub foo {..}

Yes you can, but I'd rather not tell you how because it's likely to be
the ugliest of several possible ways to do what you need. If you explain
your problem then we can help you find a better solution, but for now
how about:

my $insert = foo();

print <<END;
HTML code
$insert
END



HTH,

Rob

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to