Chapter 7. Lists and Arrays7.1. List Literals, list rangesThings in () separated by commas are called a list of things. (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
|
Follow me: