in reply to Anonymous Data Structures
For Perl,
is equivalent to$aref = [ 'a', 'b' ]; $href = { 'foo' => 123 };
You end up with just a hashref and an arrayref, and nothing else.$aref = do { my @a = ('a', 'b'); \@ }; $href = do { my %h = ('foo' => 123); \%h };
So, a better name for them would be "anonymous hash ref" and "anonymous array ref", IMO.
And no, there are no implicit names. Perl doesn't use the names internally. It doesn't need them.
And perhaps you could look into typeglobs and stashes (Symbol Table hASHES), you might find it interesting. (Best discussion I found is in the old, 1st edition of the O'Reilly book "Advanced Perl Programming"; the second edition is a different book.)
|
|---|