good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Iterating over second key in HoH defined by referenceby SamCG (Hermit) |
on Apr 04, 2014 at 16:36 UTC ( [id://1081167]=perlquestion: print w/replies, xml ) | Need Help?? |
SamCG has asked for the wisdom of the Perl Monks concerning the following question:
Essentially, I have a process that puts parties in particular transactional roles and am trying to compare production values to uat values. The data is being improved and re-mapped, and I'm trying to figure out how to quantify this.
At this point, I have a loop over the hashes that will compare values, so it will compare a production transaction for a particular role to the uat transaction for the same role and print it (so I can determine if it's changed, added, or removed). In some cases, however, a party has been remapped to a different role. I'd like to reflect this, so if I find the role defined with a value in production I really want to cycle through all the roles defined for the UAT transaction and check if I see the same value, and then print the value it's moved to. I'm only trying to do this if the role is undefined in UAT, and honestly I'm not sure this is actually what I will eventually need. Essentially I was asked for "how much data has been changed?" -- for several hundred thousand records, for several fields, in moderately complex transactions. What I have does go partway towards that, but I still think it could be improved. Anyway, comments appreciated.
----------------- s''limp';@p=split '!','n!h!p!';s,m,s,;$s=y;$c=slice @p1;so brutally;d;$n=reverse;$c=$s**$#p;print(''.$c^chop($n))while($c/=$#p)>=1;
Back to
Seekers of Perl Wisdom
|
|