Barry Brevik wrote:
> ...which is correct. Anyone out there know what gives?? And which is the
> "correct" way to define an empty hash, {} or ()?
{} is a hashref, so assigning {} to a hash will lead this empty hashref to be a
key and value is undefined.
So it's like my %parts = ( {} => undef ); which is obviously wrong.
You may want to just declare this hash using "my %parts;", it will be empty.
By the way, if you "use warnings", you should get a warning about it,
"Reference found where even-sized list expected".
--
Serguei Trouchelle
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs