Often one wishes to construct "unnamed" data structures or subroutines where one keeps track of them by reference as opposed to name
|
This is natural with subroutines which return either a data structure or subroutine
|
$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;
|
$secretsub = sub { print "Support ECS\n" };
|
executed by &$secretsub;
|