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

I am aware of this and thoroughly irked by it. It would certainly be nice if Perl could disambiguate between the two. As it turns out, there might be information in perl about that, but there doesn't seem to be much interest in fixing this.
Currently the internals of Perl can't be used to distinguish between an uninitialised value and a merely undef one. To make the core do so would involve adding an extra flag to all SVs and adding code to about every fourth line in sv.c to set or unset it as appropriate. And for very little gain.

Okay, the warning is misleading: it's warning about the use of an undef value rather than un uninitialised one. We would change the warning text, but then that would probably break half the test suites on CPAN and everyone would hate us for it.

Dave.

  • Comment on Re^3: A bit more clarity on uninitialized value in string ne