in reply to Re^2: How to use multidimensional hashes
in thread How to use multidimensional hashes

if you count/sum only the A B C D ... it is normal to get

FILE_NAME A B C D

CHECK 2 3 2 1

JAPAN A is in FILE_A and FILE_B so 2 times

CHINA B is in FILE_A (twice) and FILE_B so 3 times

MALY C is in FILE_A and FILE_B so 2 times

if you don't want to count/sum after the first time, tou have to test the exists before.

  • Comment on Re^3: How to use multidimensional hashes

Replies are listed 'Best First'.
Re^4: How to use multidimensional hashes
by Perlseeker_1 (Acolyte) on Jan 31, 2014 at 16:00 UTC
    Hi,

    JAPAN A exists in FILE_A and FILE_B, so the count is 2 but i want JAPAN A to be displayed as 1 because it appears in both files

    Example:

    I want the output as:

    FILE NAME A B C D CHECK 1 2 1 1
      but i want
      It's not of much help to repeat what you want, but leave the information out what you are doing right now. Your code obviously has a bug if it doesn't do what you want it to do, but no one can find it without a look at what you are doing right now.