首页 > 代码库 > perl的列表(List)和数组(Array)
perl的列表(List)和数组(Array)
If a scalar is the "singular" in Perl, as we described it at the beginning of Chapter 2, the "pulural" in Perl is represented by lists and arrays.
A list is an ordered collection of scalars. An array is a variable that contains a list. People tend to use the terms interchangeably, but there‘s a big difference. The list is the data and the array is the variable that stores the data. You can have a list value that isn‘t in an array, but every array avriable holds a list (althonght that may be empty).
Since lists and arrays share many of the same operations, just like scalar values and variables, we‘ll treat them parallel. Don‘t forget their difference thongh.
perl的列表(List)和数组(Array)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。