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


In reply to Re: Re: Header data from arbitrary calls by Coplan
in thread Header data from arbitrary calls by Coplan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.