I think you want
%hash = ();
which will make sure there are no elements in %hash.
Your statement was
%hash = {};
In this case, the {} will return a reference to an empty hash, and
the assignment will then attempt to make this reference into a key in
%hash. Since hash keys can only be strings, not references, it will
turn this reference into a string like "HASH(0x18015d8)" (the number
will vary depending on the memory location in your particular copy of
perl).
So %hash = {} is basically equivalent to %hash = ("HASH(0x18015d8)",
undef). This is probably not what you wanted.
On Jan 18, 2008, at 8:57 AM, Kevin Viel wrote:
Is there a way to empty/clear a hash in mass?
For instance:
%hash = {} ;
Might the above create an reference?
Thank you,
Kevin
Kevin Viel, PhD
Post-doctoral fellow
Department of Genetics
Southwest Foundation for Biomedical Research
San Antonio, TX 78227
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
--
Aaron Priven, [EMAIL PROTECTED],com, http://www.priven.com/aaron