Why am I getting the following output when I use warnings?<SNIP>
Use of uninitialized value in concatenation (.) or string at ./mship.pl line 33.Well, I'm in a hurry and I've not checked carefully the rest of this post and the answer you got. However it seems to me that you've been helped to track down that warning to something wrong you were doing. So indeed the warning has served its purpose.
Said this, it may be worth mentioning that this particular warning is proably the one that most often can be locally disabled out of good reasons, i.e. you may have a situation in which you need to e.g. interpolate a variable which can possibly be undefined and you may want to let it be interpolated silently as the empty string. If you need cope with such a state of things, of course TIMTOWTDI, but a sensible one can be to include the warning generating line(s) in a block like this:
{ no warnings 'uninitialized'; # Do what you wanna... }
Please note that I'm not suggesting this as a means to get rid of the warning the next time you'll encounter it. You should really use it only if you know in advance that you may receive that warning, but you don't want to be warned...
In reply to Re: how is this uninitialized?
by blazar
in thread how is this uninitialized?
by tcf03
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |