[thelist] $varaibles in perl
Anthony Baratta
Anthony at Baratta.com
Mon Aug 21 10:44:09 CDT 2000
Adrian Fischer wrote:
>
> Heres another one for you. The script I have has a gazillion "print"
> statements in it. I have progressively gone through it and started to
> rewrite it and use print <<"EOF"; to encompass complete pages of outputted
> <html>. Is this supposed to make the script faster or just ease up the
> workload for the server. I realise that every iteration of "print" is a hit
> on the server (at least that's what I thought) so how does getting rid of
> lots of them impacted on the compilation of the script as far as the viewer
> is concerned?
This is what I currently do....
I stuff everything I print iteratively into a single variable ( e.g. $PageHTML)
$PageHTML =. "blah bah blah\n";
$PageHTML =. "blah bah blah\n";
Rise, lather, repeat.
Then issue one print statement for the program throwing everything at once back to
the browser.
print $PageHTML;
If you go to:
http://www.dairycouncilofca.org/hl/hl_pnp_inpu.htm
This is program I wrote about a year ago and uses this method. As you can see on the
'results' pages, there is a heavy use of html, with out templates. The results are
returned quite snappy. And this is not a very powerful web server.
--
Anthony Baratta
President
KeyBoard Jockeys
South Park Speaks Version 3 is here!!!
http://www.baratta.com/southpark
Powered by Tsunami
More information about the thelist
mailing list