Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Adding an new element to array.

by poj (Curate)
on Aug 21, 2013 at 19:13 UTC ( #1050405=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Adding an new element to array.
in thread Adding an new element to array.

#!perl use strict; use Data::Dump 'pp'; my $data = [{ 'DATE' => '2013-04-25', 'TW' => '1','REF' => '1234567', 'ACC' => '33456790' }]; my $more_data = [{'DOC1' => 'EMAIL1','DOC2' => 'EMAIL2'}]; my @keys = keys %{$more_data->[0]}; @{$data->[0]}{@keys} = @{$more_data->[0]}{@keys}; pp @$data;
poj


Comment on Re^3: Adding an new element to array.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2014-07-31 12:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (248 votes), past polls