1 |
Often one wishes to construct "unnamed" datastructures or subroutines where one keeps track of them by references as opposed to name
|
2 |
This is natural with subroutines which return either a datastructure or subroutine
|
3 |
$arrayref = [1, 2, ['a', 'b', 'c'] ]; # $arrayref is a hard reference to a 2D array with 5 defined elements
-
$arrayref->[2][1] will give value 'b' as will $$arrayref[2][1]
-
$arrayref->[0][0] is 1; $arrayref->[0][1] is undef;
|
4 |
$secretsub = sub { print "Support ECS\n" };
|
5 |
executed by &$secretsub;
|