in reply to Re^2: A bit more clarity on uninitialized value in string ne
in thread A bit more clarity on uninitialized value in string ne
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: A bit more clarity on uninitialized value in string ne (init vs def)
by Tanktalus (Canon) on Jan 21, 2005 at 16:20 UTC | |
by tye (Sage) on Jan 21, 2005 at 16:30 UTC |