in reply to Re: Odd number of elements in hash assignment warning. Use of uninitialized value warning
in thread Odd number of elements in hash assignment warning. Use of uninitialized value warning

"potential signs of cluelessness - look very carefully at the remaining code", since that's also the default

I think what he means (in less sarcastic terms :) ) is that there is no reason not to simply have:

my %hash;
I'm sure some people would defend variable initialization, even to the default, but in general I think it's more readable to simply accept the default (undef) that Perl assigns. Trust Perl. Perl is your friend.
  • Comment on RE: Re: Odd number of elements in hash assignment warning. Use of uninitialized value warning
  • Download Code

Replies are listed 'Best First'.
"cluelessness" = best practice
by blogical (Pilgrim) on May 30, 2007 at 16:05 UTC
    Initializing variables with undef or () upon creation is a best practice for those who might ever have their code run under mod_perl.