[Charlotte.PM] storing arrays in a hash

Michael Kondratovich kbear at carolina.rr.com
Fri Mar 25 08:07:11 PST 2005


Diona,

Try

		@array = @{ $hash{ $key } };

MK


On Mar 25, 2005, at 10:51 AM, diona kidd wrote:

> Hey guys,
>
> I've got another one for you. I liked the last conversation, so why not
> start another?
>
> I've been working on a script lately (usually pretty late in the
> evening ;) where I'm storing arrays in a hash while going through a
> loop. Once I'm out of the loop, I iterate over the hash, acting on the
> key/value pairs. Odd thing is, when I try to pull the array back out of
> the hash...it's not an array anymore. If I ref the value of the hash
> key, nothing is printed out...I would expect to see ARRAY.
>
> Has anyone else ran across this? Is there something I'm not aware of,
> like maybe I need to make the array a ref before storing it in the 
> hash?
> I've already done the traditional google search.
>
> Thanks,
>
> Diona
>
> _______________________________________________
> charlotte mailing list
> charlotte at pm.org
> http://mail.pm.org/mailman/listinfo/charlotte
>



More information about the charlotte mailing list