On Wed, 3 May 2000, Jeffrey W. Baker wrote:

> 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.

it only pulls that stunt for strings.  assuming you're only printing the
reference for debugging purposes, just stringify it first:

my $foo = \"bar";

print "$foo";

or, geoff's trick:

my $foo = "bar";

print \$foo . "";

do you need to avoid this feature for something other than debugging?

Reply via email to