For the same reason why it's prevented with other readonly values like literal scalars ??
As you have demonstrated, anonymous references are not readonly, so Perl does not prevent them from being overwritten. I still don't see a compelling reason why they should be read-only. Can you provide an example for "catching bugs with aliases"?
In reply to Re^3: Shouldn't references be readonly?
by haj
in thread Shouldn't LITERAL references be readonly? (updated)
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |