September 2017
Beginner
402 pages
9h 52m
English
The quote-word operator < > creates a list using the whitespace-separated data place between the angle brackets.
The following example prints a list containing three elements:
say <a b c>; # (a b c)
There is no need to quote elements inside the < > operator. Now, let's save the created array in a variable and see its contents:
my @a = < 1-3 two 3+6 four 5/7 >;say @a.elems;say @a.join('|');
In this program, five elements are put into the @a array, as shown here:
51-3|two|3+6|four|5/7
The elements are separated by whitespaces, so constructions like 1-3 or 5/7 are treated as strings.
Read now
Unlock full access