Meaning of NEXT in Linked List creation in perl
问题 So I am trying to learn Linked Lists using Perl. I am reading Mastering Algorithms with Perl by Jon Orwant. In the book he explains how to create a linked list. I understand most of it, but I just simply fail to understand the command/index/key NEXT in the second last line of the code snippet. $list=undef; $tail=\$list; foreach (1..5){ my $node = [undef, $_ * $_]; $$tail = $node; $tail = \${$node->[NEXT]}; # The NEXT on this line? } What is he trying to do there? Is $node a scalar, which