All the Perl that's Practical to Extract and Report

Navigation

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.

Please Log In to Continue

For the most part, the only warning perl issued during runtime for my programs 'Use of uninitialized value...', which is a pretty lame warning since Perl defines new created variables to be, er, undefined.

I always use 'perl -w'. I almost always find that 'Use of unitialized value' inicates a mistake that I need to correct. Sure, if you are testing for defined(), then the code can catch this and do something intelligent, but that's not usually the case in my code.

Maybe I don't understand what you're getting at or maybe our coding styles are radically different, but I pretty much always want to be warned that I'm using an unitialized value.

I do 'use strict,' so don't take me for a total slacker. I haven't seen many situations in my code that the 'uninitialize' warning is helpful. With 'use strict' and a -wc check, I can catch typos at compile time. After that, I normally *depend* on values being uninitialized. For instance: