in reply to Multiple File handling and merging records from 2 files

Hi kris1511,

You can use nested hash if you want to. But it can be quite simpler (and faster is your dataset is large).

Think about it. You're interested only with apps that have two cores (I guess you meant two cores, not two CPUs). Start by reading the second file and just make a list with the apps with two cores. I would use a simple hash for that list (with the app name/number as key, and whatever (say 1) as a temporary value.

Then read the first file, just discard the apps not in the hash and populate the values in the hash with the size. Finally sort the hash by its values.

  • Comment on Re: Multiple File handling and merging records from 2 files