Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Converting HoA into AoH

by neversaint (Deacon)
on Oct 31, 2005 at 06:04 UTC ( #504165=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $HoA = {
                flintstones        => [ "fred", "barney" ],
                jetsons            => [ "george", "jane"],
          };
    
  2. or download this
    # Desired result:
    my $AoH = [
    ...
    
    ];
    
  3. or download this
    my $HoA = {
                '1,2,flintstones' => [ "fred-1 foo-2", "barney-1 bar-2" ],
                '2,3,jetsons'   => [ "george-1 foo-2", "jane-1 bar-2"],
          };
    
  4. or download this
    my $HoA3 = {
                'flintstones'    => [ "fred" ],
    ...
                'jetsons' => 'george'
              }
            ];
    
  5. or download this
    my $HoA4 = {
                'flintstones'    => [ "fred" ],
    ...
              }
            ];
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://504165]
Approved by BrowserUk
Front-paged by monkfan
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-06-06 21:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (41 votes). Check out past polls.

    Notices?