by ccosner@[EMAIL PROTECTED]
(Chris Cosner)
Aug 7, 2007 at 05:27 PM
Aha. Many thanks.
Now I'm on the right track (see Anonymous Data in the Perl Cookbook, ch.
11).
Mr. Shawn H. Corey wrote:
> Chris Cosner wrote:
>> If you put a hash reference into an array
>> push @[EMAIL PROTECTED]
\%hash;
>> you do not store any actual hash data in the array.
>> So if you change the hash, then later pull the hash reference from the
>> array and access it, you get changed data.
>
> push @[EMAIL PROTECTED]
{ %hash };
>
> This creates an anonymous hash and populates it with the contents of
> %hash. It makes a copy of %hash. Of course, if %hash has any
> references, they will be copied but not their contents.
>
>