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.

Comment on Re: Combining data help!
Select or Download Code
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-11-30 03:31 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (757 votes), past polls