《Intermediate Perl》中一段CODE如何理解?

《Intermediate Perl》中一段CODE如何理解?



QUOTE:
Imagine for a moment that the intermediate variables are all part of a subroutine:

my @all_with_names;

sub initialize_provisions_list {
  my @skipper = qw(blue_shirt hat jacket preserver sunscreen);
  my @skipper_with_name = ('The Skipper', \@skipper);

       my @professor = qw(sunscreen water_bottle slide_rule batteries radio);
  my @professor_with_name = ('The Professor', \@professor);

  my @gilligan = qw(red_shirt hat lucky_socks water_bottle);
  my @gilligan_with_name = ('Gilligan', \@gilligan);

  @all_with_names = ( # set global
    \@skipper_with_name,
    \@professor_with_name,
    \@gilligan_with_name,
  );
}

initialize_provisions_list(  );



We set the value of @all_with_names to contain three references. Inside the subroutine we have named arrays with references to arrays first placed into other named arrays. Eventually, the values end up in the global @all_with_names. However, as the subroutine returns, the names for the six arrays disappear. Each array has had one other reference taken to it, making the reference count temporarily two, and then back to one as the name disappears. Because the reference count is not yet zero, the data continues to live on, although it is now referenced only by elements of @all_with_names.

----------------单词没有问题,但是翻译器来总怪怪的,尤其红色部分,以致无法整体把握文章在讲些什么。请大家用程序语言帮解释解释,谢谢!

closure?
Inside the subroutine we have named arrays with references to arrays first placed into other named arrays,

这句啥意思?呵呵
是关于 reference 计数的问题。

当那个 函数 调用完了时,它所用的那几个 array 本来应该自动消失的(reference 计数为0),但是,他们被 引用  了(reference 计数为 2),减掉1,还是 1, 不能消失。所以那些数据还是存在的,虽然不能通过那几个 array 的名字访问了,但可以通过 @all_with_name 里保存的 引用 来访问。

这 closure 吗? 版主给解释解释