kris1511 has asked for the wisdom of the Perl Monks concerning the following question:
use Data::Dumper; my $h1 = { 'location_setting' => [ '409' ], 'status' => [ '501' ] }; my $h2 = { 'status' => [ '137', '124' ], 'location_setting' => ['405' +], 'classification' => ['0']}; my $x = {%$h1, %$h2}; print Dumper $x; Output ----------- $VAR1 = { 'classification' => [ '0' ], 'location_setting' => [], 'status' => [ '137', '124' ] };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Merge 2 array/Hash into 1 variable Perl
by dbander (Scribe) on Aug 03, 2017 at 21:38 UTC | |
by johngg (Canon) on Aug 03, 2017 at 22:10 UTC | |
by dbander (Scribe) on Aug 04, 2017 at 23:08 UTC | |
by kris1511 (Acolyte) on Aug 07, 2017 at 20:19 UTC | |
|
Re: Merge 2 array/Hash into 1 variable Perl
by kcott (Archbishop) on Aug 04, 2017 at 06:01 UTC | |
|
Re: Merge 2 array/Hash into 1 variable Perl
by Your Mother (Archbishop) on Aug 03, 2017 at 22:24 UTC | |
|
Re: Merge 2 array/Hash into 1 variable Perl
by thanos1983 (Parson) on Aug 03, 2017 at 23:00 UTC |