in reply to uninitialized variables
All the above are good and probably the recommended way to do things. However, here's another option that I've used in the past.
Instead of using the -w switch, try use warnings (just like use strict). Then, in situations where you *know* that the data might not be there turn warnings off with no warnings before assigning to your variables. Once that bit of code is done, turn it back on using use warnings again.
Maybe not the best way, but convienient when you have a whole whack of variables that you might be assigning to, and don't want to initialize them all to "0".
|