in reply to Re: undef'ing @arrays caveat
in thread undef'ing @arrays caveat

i don't find that so strange weird. in each case, the assignment to hash assumed a second argument of undef. it's as if you assigned %hash=undef,undef;. perl just helps you do what you mean. as in the post above, list context is assumed due to the type of the lvalue of the assignment operation.

however, %hash=undef=>undef; may not do what you mean, if you don't know what you mean. here, the difference between , and => is plain.

# $VAR1 = { # 'undef' => undef # };

p.s. assignment is pretty much guaranteed to do just that--assign something. if you want to assign an empty hash, you'll have to assign one %hash = ()

~Particle ;