Array (@)
Try it yourself →Ordered values.
Syntax
my @a = (...); push @a, x;
Description
@ for arrays. $a[0] is the first element, push adds elements, scalar(@a) gives the element count, sort sorts them.
Example
my @a = (5, 10, 15); push @a, 20; print "$a[1]\n"; print scalar(@a), "\n";
Expected output
10 4
When to use?
Storing lists.