Incidentally, the $r-print() method conveniently lets you pass the string
you want to send by reference.
Why is that "convenient":
Fast:
my $x = "fred" x 1;
$r-print $x;
More obscure and microscopicaly slower:
my $x = "fred" x 1;
$r-print \$x;
(Hint -
On Mon, 19 Jun 2000, John Hughes wrote:
(Hint - Perl passes all values by reference.
Are you sure thats the case with XS code? I don't personally know XS very
well, but there are some wierd things about it, and this might be one of
them. I know for certain that XML::Parser has a lot of
De : Shane Nay [mailto:[EMAIL PROTECTED]]
To comment on what John originally said..., arg, here we go. The
difference between print \$somevariable, and print $somevariable can
be very significant.
Nope. Not "very".
Everything is passed internally as a "reference", but that
doesn't me
Since mod_perl and CGI scripts are dynamic, it seems that
Content-length has to be handled by the script. I'm curious
how some of you are handling this. It would seem to me that
you need to know all of your output before printing the first
line.
Jim
"JS" == Jim Serio [EMAIL PROTECTED] writes:
JS Since mod_perl and CGI scripts are dynamic, it seems that
JS Content-length has to be handled by the script. I'm curious
JS how some of you are handling this. It would seem to me that
How I handle it is to ignore it. Nothing really breaks without
"JS" == Jim Serio [EMAIL PROTECTED] writes:
JS I too ignore this header but a system I'm integrating
JS with that uses JSP to fetch data from an URL on my system
JS aparently need to rely on the content-length. As for
But content-length is NOT a required header for HTTP protocol, is it?
If the
But content-length is NOT a required header for HTTP protocol, is it?
If the program is relying on it, then it is broken and should be
fixed.
The other alternative is to generate your entire page as a string, get
the string's length() and print that as your content-length header.
Quite