[ic] Array of Hashes
Rok Ruzic
rok.ruzic at informa.si
Tue May 18 21:22:16 UTC 2010
Store its reference.
Regards,
Rox
On Tue, 18 May 2010 16:10:46 -0400
Rick Bragg <lists at gmnet.net> wrote:
> Hi,
>
> I want to be able to store an array of hashes in the session, but it
> seems I am having trouble with this. My problem is how do I store a
> hash in the session for later? and how do I access this later on?
>
> i.e. storing:
>
> The array would be something like the following:
>
> [calc]
> @AoH = (
> { sku => "item_101", color => "green", },
> { sku => "item_102", color => "blue", },
> { sku => "item_103", color => "red", },
> { sku => "item_104", color => "gray", },
> );
> $Scratch->{saved_item_hash} = join(' ', @AoH);
> return;
> [/calc]
>
>
> Then somewhere else on the page access again later somehow with:
> [calc]
> my @AoH = split(' ',$Scratch->{saved_item_hash});
> [/calc]
>
> I know this is wrong, but any ideas or best practice for this?
>
> Thanks
> Rick
>
>
>
>
>
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.icdevgroup.org/pipermail/interchange-users/attachments/20100518/639c8823/attachment.pgp>
More information about the interchange-users
mailing list