Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Combining data help!

by kennethk (Abbot)
on Mar 06, 2013 at 16:54 UTC ( #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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022036]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2018-05-27 00:12 GMT
Find Nodes?
    Voting Booth?