use Data::Compare; # this test is called "Scalar Cross" in both the Data::BFDump and Data::Stream test sets my ($a,$x,$y)=([]); $x=\$y; $y=\$x; $a->[0]=\$a->[1]; $a->[1]=\$a->[0]; print Compare([$x,$y],$a); # infinte loop