in reply to Re: Header data from arbitrary calls
in thread Header data from arbitrary calls

I'm not sure I follow.

The subroutine that my code is contained within is the part that generates the entire HTML file, based on the template with the additional information filled in. I can generate the header information after the rest of the body is generated, that really isn't the problem. The problem is that I'm trying to return both the HTML buffer to be returned by the templateCall, as well as some other information (like if a cookie is set, or the refresh page information). For example...if I were working without a template model, I would be doing things differently. The subroutine called by templateCall would have a return line like this:

sub SomeTemplateCall { my $refresh = "http://www.scenespot.org"; my $cookie = "some random number"; my $buffer .= "<b>Stuff</b>"; return ($buffer, $cookie, $buffer); } # The subroutine that called it: sub templateParser { my ($HTML, $cookie, $buffer) = SomeTemplateCall(); # Header would then be generated utilizing $buffer, $cookie # $HTML would then be the rest of the damn website }

Due to the nature of my script, I can't really do things that way, apprently. At least it doesn't seem to work as I showed above.

--Coplan