Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: Converting HoA into AoH

by neversaint (Deacon)
on Oct 31, 2005 at 15:19 UTC ( #504288=note: print w/replies, xml ) Need Help??

in reply to Re: Converting HoA into AoH
in thread Converting HoA into AoH

Dear tpyahoo,
Thanks for the answer. But why the results has to be this complex/deep?
$VAR1 = [ [ { 'jetsons' => 'george' }, { 'flintstones' => 'fred' } ], [ { 'flintstones' => 'fred' }, { 'jetsons' => 'jane' } ] ];
I just want simple AoH.

neversaint and everlastingly indebted.......

Replies are listed 'Best First'.
Re^3: Converting HoA into AoH
by tphyahoo (Vicar) on Oct 31, 2005 at 15:44 UTC
    I'm not really clear on what you mean by that. Is what you had in readmore tags the result that you want? This skips over the women, so I'm assuming that's not it.

    Is it the code you are calling complex, or the resulting datastructure? What exactly is the final datastructure you are looking for?

    Do you want to take your show / char hash combos two at a time, or is one at a time okay? (In which case you get an array of eight hashes.) If an array of eight hashes is what you want, try dumping $AoH_show_characters after the second chunk of code.

    Otherwise, if you want four arrays of two hashes each, like my code produces, I can't see any way to get the job done without this kind of maybe slightly confusing nesting.

    Good luck!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://504288]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2020-05-31 03:31 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (173 votes). Check out past polls.