Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Combining data help!

by kennethk (Abbot)
on Mar 06, 2013 at 16:54 UTC ( [id://1022036]=note: print w/replies, xml ) Need Help??


in reply to Combining data help!

What do you mean by "the values from $listA to @listB"? Do you mean append them to the end of the list (push)? Do you mean insert those fields into the hash refs? See How do I post a question effectively?. In particular, showing code and desired output would be very helpful.

Assuming you are trying to insert the key-value pairs in $listA into each element of @listB, using Foreach Loops seems pretty straight forward:

foreach my $acct (@listB) { %$acct = (%$acct, %{$listA->[0]}); }

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Replies are listed 'Best First'.
Re^2: Combining data help!
by Anonymous Monk on Mar 06, 2013 at 17:16 UTC
    Sorry for the incosistency, but just need to add this block
    { 'ZIP' => '01111', 'CITY' => 'New York, NY', 'STREET_NAME_1' => 'CONNECTOR PARK', 'STREET_NAME_2' => '100 MAINST' } ]
    to the other variable.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 23:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found