码迷,mamicode.com
首页 > 编程语言 > 详细

perl的列表(List)和数组(Array)

时间:2016-09-25 17:19:22      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:

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)

标签:

原文地址:http://www.cnblogs.com/liulele622/p/5906135.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!