Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Mapping an array to a string

by Punitha (Priest)
on Jan 08, 2008 at 09:45 UTC ( #661042=note: print w/replies, xml ) Need Help??


in reply to Mapping an array to a string

Hi chuck_norris

Did you want to do something like this

use strict; my @AoH = ( {'Lead'=>'fred','Friend'=>'barney'}, {'Lead'=>'george','Wife'=> 'jane','Son'=>'elroy'} ); my $string = \@AoH; for my $href ( @$string) { for my $role ( keys %$href ) { print "$role:$href->{$role}\n"; } }

Punitha

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://661042]
help
Chatterbox?
[TCLion]: Ok I have used SoPW, any feedback would be appreciated
[Eily]: yes, but if you have to borrow it please don't leave any parselmouth stains on it!
[TCLion]: was wondering why is the code window so small for SoPW?
[LanX]: qu'est-ce que c'est?
[LanX]: oh millennial folklore. ..
[TCLion]: Headed to lunch late, be back soon

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (14)
As of 2017-03-23 17:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (292 votes). Check out past polls.