"Jeffrey W. Baker" <[EMAIL PROTECTED]> writes:

> Apache::print() dereferences its arguments.  For example, this code:
> 
> my $foo = "bar";
> $r->print(\$foo);
> 
> prints "bar" instead of the expected SCALAR(0xDEADBEEF).  Can anyone
> explain the purpose of this behavior, or is it a misfeature?  In my case,
> this is not the desired behavior.

If I recall correctly, this is a performance issue.  If you have a
large string you want to print, sending a reference will result in
less data copying etc.  I don't know how much it pays off, but it is
an intended effect.

You could try something like:

$r->print("@{[\$foo]}");

Chip

-- 
Chip Turner                   [EMAIL PROTECTED]
                              ZFx, Inc.  www.zfx.com
                              PGP key available at wwwkeys.us.pgp.net

Reply via email to