in reply to Creating an array of hash references
It's not entirely clear to me where the problem is - what you said you want to do sounds reasonable to me, so I'm guessing that I'm missing where the problem is.
Perhaps some code would help?
What is the data coming across the wire - how do you know beginning and end of the hash?
my $context; my @list; while (1) { my @data = get_next_key_and_value(); if (@data) { # got an extra key/value for current hash. $context->{$data[0]} = $data[1]; } else { # end of current hash. push @list, $context; $context = undef; } }
Something like that may help? Hard to tell.
|
|---|