perl cookbook 2th,chapter 4
In this chapter, we'll use the terms list and array as the Perl
language thinks of them. Take ("alpha", "beta", "gamma"); that's a list of the names of the first three Greek letters, in
order. To store that list into a variable, use an array, as in @greeks =
("alpha", "beta", "gamma"). Both are ordered groups
of scalar values; the difference is that an array is a named variable, one whose
array length can be directly changed, whereas a list is a more ephemeral notion.
You might think of an array as a variable and a list as the values it contains.
阅读(1464) | 评论(0) | 转发(0) |