Perlseeker_1 has asked for the wisdom of the Perl Monks concerning the following question:
I am using multidimensional hashes for the first time, and i have come across some issues, please suggest me some ideas to resolve
$VAR1 = 'FILE_A'; $VAR2 = { 'CHECK_1' => { 'JAPAN' => { 'A' => 1 }, 'CHINA' => { 'B' => 2 }, 'MALYA' => { 'C' => 1 }, 'EUROP' => { 'D' => 1 } } }; $VAR3 = 'FILE_B'; $VAR4 = { 'CHECK_2' => { 'JAPAN' => { 'A' => 1 }, 'CHINA' => { 'B' => 1 }, 'EUROPE' => { 'C' => 1 } }
Output what i got
FILE_NAME A B C D CHECK 2 3 2 1
Output what i am expeting
FILE_NAME A B C D CHECK 1 2 1 1
I am reading the data from two files and checking if data exist in other file, if exists then exclude those records while writing final output
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to use multidimensional hashes
by toolic (Bishop) on Jan 31, 2014 at 14:34 UTC | |
|
Re: How to use multidimensional hashes
by SimonPratt (Friar) on Jan 31, 2014 at 16:11 UTC | |
|
Re: How to use multidimensional hashes
by x-lours (Sexton) on Jan 31, 2014 at 14:47 UTC | |
by Perlseeker_1 (Acolyte) on Jan 31, 2014 at 15:16 UTC | |
by x-lours (Sexton) on Jan 31, 2014 at 15:29 UTC | |
by Perlseeker_1 (Acolyte) on Jan 31, 2014 at 16:00 UTC | |
by Pickwick (Beadle) on Feb 01, 2014 at 21:11 UTC |