http://qs321.pair.com?node_id=11120317


in reply to Re: Shouldn't references be readonly?
in thread Shouldn't LITERAL references be readonly? (updated)

[1,2,3] is called a literal array in many languages like for instance JavaScript.

Since Perl has both an explicit $reference and a @list form of its data structures, it might be difficult to point out "the" literal form.

> I also fail to see why Perl should prevent it.

For the same reason why it's prevented with other readonly values like literal scalars ... to catch bugs with aliases.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery