undef is how Perl designates that a variable is uninitialized. undef $var is how you declare that the variable is no longer initialized. $var= undef does the same thing.
If you try to disinguish 'undef' from 'uninitialized', then you'd need a new way to deinitialize variables and an alternative for defined that would tell you if a variable was initialized.
undef and defined are just Perl's methods of introspection about whether a variable is initialized. It is good that you can explicitly mark a variable as uninitialized and that you can programmatically check for initialization. Marking a variable as uninitialized can look like initializing the variable.
I agree that using "uninitialized" instead of "undefined" in error messages is unfortunate. But they mean the same thing in Perl.
- tye
In reply to Re^3: A bit more clarity on uninitialized value in string ne (init vs def)
by tye
in thread A bit more clarity on uninitialized value in string ne
by wolis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |