in reply to Why will referencing an undefined value as array reference create a real array

That was a conscious design-decision by the language designers ... and a very good one, indeed.   When you refer to an as-yet undefined variable in a particular context, it will automagically become a reference to an empty instance of whatever is appropriate to that context ... “auto-vivification,” as previously stated.   An incredibly useful feature of the language for pragmatic script-writing.