in reply to Re^4: Shouldn't references be readonly?
in thread Shouldn't LITERAL references be readonly? (updated)
Which of the following do you regard as a literal array:
I regard none of them as literal. [] {} are constructors; they are just syntactic sugar for a function which takes a list and returns a reference to an anonymous aggregate, e.g.[] [1,2,3] [1,2,$x]
[1,2,3] # is the same as anon_array(1,2,3); sub anon_array { my @a = @_; \@a }
Dave.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Shouldn't references be readonly? (updated)
by LanX (Sage) on Aug 05, 2020 at 18:51 UTC | |
by dave_the_m (Monsignor) on Aug 05, 2020 at 21:20 UTC | |
by LanX (Sage) on Aug 05, 2020 at 21:41 UTC | |
by LanX (Sage) on Aug 05, 2020 at 21:35 UTC | |
by dave_the_m (Monsignor) on Aug 06, 2020 at 08:51 UTC | |
by LanX (Sage) on Aug 06, 2020 at 12:26 UTC | |
by chromatic (Archbishop) on Aug 06, 2020 at 00:41 UTC | |
by LanX (Sage) on Aug 06, 2020 at 01:35 UTC | |
|
In Section
Seekers of Perl Wisdom