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?
- Why does $r->print() dereference its arguments? Jeffrey W. Baker
- Re: Why does $r->print() dereference its argume... Stas Bekman
- Re: Why does $r->print() dereference its argume... Chip Turner
- Re: Why does $r->print() dereference its ar... Jeffrey W. Baker
- Re: Why does $r->print() dereference it... Gunther Birznieks
- Re: Why does $r->print() dereference its argume... Randal L. Schwartz
- Re: Why does $r->print() dereference its argume... Doug MacEachern
- Re: Why does $r->print() dereference its ar... Jeffrey W. Baker
- Re: Why does $r->print() dereference it... Doug MacEachern
- RE: Why does $r->print() dereference its argume... Geoffrey Young
- RE: Why does $r->print() dereference its ar... Stas Bekman
- RE: Why does $r->print() dereference its argume... Geoffrey Young
- RE: Why does $r->print() dereference its ar... Stas Bekman
- Configuring Apache with <PERL> secti... James Olsen
- RE: Why does $r->print() dereference its argume... Geoffrey Young