in reply to Re^3: Add array ref to another array ref
in thread Add array ref to another array ref

I did a data dumper on $data_b and got this:
$VAR1 = [ { 'house' => 'main', 'number' => '0123', 'area' => 'north', 'code' => 'zip', }; ]

And on $data_a was this:
$VAR1 = { 'fullname' => 'Ms Mary Lou', 'first' => 'Mary', 'last' => 'Lou', };

Replies are listed 'Best First'.
Re^5: Add array ref to another array ref
by AnomalousMonk (Archbishop) on Jul 15, 2019 at 19:22 UTC

    As shown by its data dumper output, $data_b is a reference to an array. The referenced array has a single element: a reference to a hash with four elements as shown.

    Assuming a successful operation to merge the contents of the hash referenced by $data_a, what would you then want the data dumper output of $data_b to look like?

    Update: The Perl Data Structures Cookbook (perldsc) may prove helpful now and in the future.


    Give a man a fish:  <%-{-{-{-<