in reply to How to change referent of lexical reference?
I would assume there's a corresponding way to do it in XS too, but I'm not the one to ask about that.my $foo = \"foo"; my $bar = \"bar"; print "$$foo\n"; change_ref($foo); print "$$foo\n"; sub change_ref { $_[0] = $bar; } __OUTPUT__ foo bar
blokhead
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to change referent of lexical reference?
by autarch (Hermit) on Sep 21, 2003 at 20:58 UTC |