Chapter 7. Lists and ArraysThings in () separated by commas are called a list of things.
A list is an ordered set of scalar values.
Examples of lists: (1, 5.2, "apple") # 3 values
(1,2,3,4,5,6,7,8,9,10) # nice but we are too lazy, so we write this:
(1..10) # same as (1,2,3,4,5,6,7,8,9,10)
('a'..'z') # all the lowercase letters
("apple", "banana", "peach", "blueberry") # is the same as
qw(apple banana peach blueberry) # quote word
($x, $y, $z) # We can also use scalar variables as elements of a list
If you are interested in on-site trainings by the author, please
contact me directly.
|