in reply to Re^4: A bit more clarity on uninitialized value in string ne (init vs def)
in thread A bit more clarity on uninitialized value in string ne

The fact that perl guarantees that uninitialised variables are undef allows the semantics you're arguing for, that they mean the same thing in perl, but that just seems to be an accident due to a feature.

No, I'm pretty sure that Perl guarantees that uninitialized variables are undef because that was the point of undef and defined and having a warning for trying to get a string or number from undef. The point was to offer ways of tracking uninitialization. That is why, when the person was writing the text for the warning for "you used undef" pulled out the word "uninitialized", because that was the concept motivating the whole exercise.

- tye        

  • Comment on Re^5: A bit more clarity on uninitialized value in string ne (init vs def)