Jeff Abrahamson on 13 Dec 2004 00:42:14 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

perldb weirdness

Notice how I appear to have two different arrays with base address
0x8522038.  Does this make sense to anyone here?

      DB<64> @k=keys %unique_sets

      DB<65> $k=$k[0]

      DB<66> x $k
    0  'ARRAY(0x8522038)'
      DB<67> x $sets{$s}
    0  ARRAY(0x8522038)
       0  'jpw'
      DB<68> x @{$k}
      empty array
      DB<69> x $unique_sets{$k}
    0  ARRAY(0x8522038)
       0  'jpw'

A snippet of the underlying code is this:

    my %unique_sets;
    for my $s (keys %sets) {
	print $sets{$s}, "\n";
	$unique_sets{$sets{$s}} = $sets{$s};
	print $sets{$s}, "\n";


 Jeff Abrahamson  <>    +1 215/837-2287
 GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B

 A cool book of games, highly worth checking out:

Attachment: signature.asc
Description: Digital signature