http://qs321.pair.com?node_id=1197145


in reply to quick way to add value of a hash with same x, y, z?

Quick comments: Use a hash on the first file, such as:
$hash{"$x,$y,$z"}{no} = $no; $hash{"$x,$y,$z"}{pressure} = $pressure;

Then with the coords from the second file, search in the hash for matching coords.

Problem: The coords have a lot of decimal places. These should be normalized before creating the hash entries, and before searching the hash keys. Decide how many significant digits are more than enough, and use sprintf with a fixed decimal ("f") descriptor.

-QM
--
Quantum Mechanics: The dreams stuff is made of