![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: quick way to add value of a hash with same x, y, z?by QM (Parson) |
on Aug 10, 2017 at 10:08 UTC ( #1197145=note: print w/replies, xml ) | Need Help?? |
Quick comments:
Use a hash on the first file, such as:
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
In Section
Seekers of Perl Wisdom
|
|