J
J Krugman
I've run into a paragraph in an old clpm post that I don't understand:
You are allowed to dereference an undefined value as an lvalue
(to make an assignment, for example); Perl allocates memory for
its referent automatically. But what about using `undef' as an
rvalue? Dereferencing the undefined value as an rvalue just produces
another undefined value--unless you're running under the `use strict'
directive. In that case, it instead raises an exception!
[ so far so good ]
This is one
reason why you may sometimes want to pre-allocate an anonymous data
type by reference.
Huh? What does it mean to "pre-allocate an anonymous data type
*by reference*"? (Please, could someone give me an example?) And
why is the foregoing a reason one may want to do such pre-allocation?
TIA!
jill
You are allowed to dereference an undefined value as an lvalue
(to make an assignment, for example); Perl allocates memory for
its referent automatically. But what about using `undef' as an
rvalue? Dereferencing the undefined value as an rvalue just produces
another undefined value--unless you're running under the `use strict'
directive. In that case, it instead raises an exception!
[ so far so good ]
This is one
reason why you may sometimes want to pre-allocate an anonymous data
type by reference.
Huh? What does it mean to "pre-allocate an anonymous data type
*by reference*"? (Please, could someone give me an example?) And
why is the foregoing a reason one may want to do such pre-allocation?
TIA!
jill