I know I can create html code using CGI and call a subroutine in there easily but if i were to use a here do***ent 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 {..}