perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RobertCZ <>
Subject Re: Array of Hashes in %udat
Date Mon, 10 Jan 2005 19:27:50 GMT
Derrick Spell wrote:

> I have an array of hashes that I would like to store in %udat.  First 
> of all, is this possible?  Second, what is the correct syntax.  I have 
> tried:
> $udat{AoH} = @AoH;
> but the array doesn't seem to be there when I try to retrieve it.

You cant put array there, just an array ref.

$udat{AoH} = [ @AoH ];

works, or maybe

$udat{AoH} = \@AoH;

- Robert

PS Dont forget %udat will NOT notice deep change eg if you change 
something inside one of the hashes, you have to force session save with 
some top-level change maybe something like $udat{changed}++ etc

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message