Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
This doesn't explain your error message, but it does highlight a couple of problems with your code that could be a contributory factors.
You''ll notice that there is no key 'err' defined in the hash, and that, "I'm commited" was printed. If I modify this as follows:
This time, the "I'm commited" wasn't printed! The reason for this is autovivifcation. Even testing for the presence of a hash element if you do it in any other way than using exists. Even doing if (defined $args->{key}) {...} will cause the key to 'spring into existance'. Another clue to your error message is that coding if ($somevar) is semantically similar to doing if ( $somevar ne '' ) and the test is probably translated as such by the compiler. Changing your code to use exists key && key may make your warning go away. I did have a thought that if the reference being shifted into $args is a bless'd reference, the source of the warning might lie outside your code in the blessing package, but my knowledge of Perl's OO stuff is still in it's infancy, so I can't add anything to the thought. What's this about a "crooked mitre"? I'm good at woodwork! In reply to Re: Use of uninitialized value in string
by BrowserUk
|
|