$node->{LEFT} = $node->{RIGHT} = $node;
A more serious concern is that unreachable memory with a non-zero reference count will not normally get freed. Therefore, this is a bad idea:
{
my $a;
$a = \$a;
}
Even thought $a should go away, it can't. When building recursive data structures, you'll have to break the self-reference yourself explicitly if you don't care to leak.