in reply to Passing pointers around
and I'm assuming you're using ref's to scalars as a learning experience. I dunno if the $$_&lbr;0] (sorry, forgot the code for left bracket) is putting another layer of ref in there. Likewise:sub fubar { my $ref = shift; ${$ref} = 4; print "$$ref\n"; }
works too. More questions? Buy Object Oriented Perl (by D. Conway) As good a 30 bucks as you can spend on perl manuals (not the best, but as good as ... ;-).feebar(\$blahblah); sub feebar { my $ref = shift; $$ref = 4; print "$$ref\n"; }
a
|
|---|