New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re: User of uninitialized value #1512
Comments
From gnat@frii.comNicolas MONNET writes:
You're right, "use of uninitialized value" should really be "use of # $x is never given a value Many Perl functions use undef as an error value (e.g., <FH> to read And it shouldn't. In all three cases, you've given a value to a And the POINT of -w is to warn on suspicious things.
The first and last do not print a warning because ++ is special-cased The middle one *does* emit a warning. You're treating undef like a In 5.6, warnings are customisable. You can turn off individual use warnings; but I remind you that almost every use of undef as though it were However, it's probably way too late to change the name of Nat |
From [Unknown Contact. See original ticket]On Mon, 27 Mar 2000, Nathan Torkington wrote: |You're right, "use of uninitialized value" should really be "use of I don't know the perl internals well enough, HOWEVER, should'nt it be that Example: $a = 'sumthin'; ... should be fine ... but $a = 'sumthin'; ... should output a warning, should'nt it? |but I remind you that almost every use of undef as though it were Case in point: DBI returns undef for SQL NULL. Say you want to see if the In this case, you don't care if $cell is undef or not. I fail to see how, Note: I'm not trying to have Perl's behavior changed, just to point out |However, it's probably way too late to change the name of |
Migrated from rt.perl.org#2729 (status was 'resolved')
Searchable as RT2729$
The text was updated successfully, but these errors were encountered: