On Thursday, June 6, 2002, at 01:07 , Jeff 'japhy' Pinyan wrote: [..] > Oops! That one is NOT for copies -- the makes all three point to the same > array reference, and it's probably the most convenient way to do it. [..]
ok, I'm gonna skip over the WHY part of the question.... thank Japhy for his clear signs of dementia - and note for folks at home that in http://www.wetware.com/drieux/pbl/perlTrick/HashGames.txt we point out one of the few times when that unDerefed trick is really worth having around... I figured it would be simpler to do something like sub WhoofMe { my ($msg, $key, %hash ) = @_; print "$msg\n"; for my $ref (@{$hash{$key}}){ my $gotone=ref($hash{$ref}); print "$ref refs $gotone $hash{$ref}\n"; } } # end of WhoofMe to gin up the data to verify Japhy's Psychosis with: Different Copies: A1 refs ARRAY ARRAY(0x126fc) A2 refs ARRAY ARRAY(0x128b8) A3 refs ARRAY ARRAY(0x12918) Same by Hash Slicing: A1 refs ARRAY ARRAY(0x12978) A2 refs ARRAY ARRAY(0x12978) A3 refs ARRAY ARRAY(0x12978) so that if the FRUITLOOP brigade really wants to play the rest of this gambit out and change the A1 stuff and then note that say print "$ref refs $gotone $hash{$ref} :-> @$hash{$ref}\n"; then they would have a framework to play that skank... ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]