![]() |
|
Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Difference of Hashby thanos1983 (Parson) |
on Apr 06, 2017 at 11:08 UTC ( [id://1187254]=note: print w/replies, xml ) | Need Help?? |
Hello Nansh, It seems that you are doing your first steps in Perl just now. It would be very good for you to always use strict and warnings. Now regarding your question, since I got the opportunity to answer on your previous question (Findidng Difference between two hash of arrays), I start to wonder if you really want to use Hashes of Arrays or simple perldata (hash/Subscripts). When you have a hash you do care about the sequence of the keys in the hash, as long as you have the key you can compare keys. I think in you case you want to compare the fruits and find the difference. If this is the scenario (assuming because your description and approach is not clear) it can be done like this:
Obviously the two hashes contain the same names and fruits apart from the plural on the second hash. I hope this helps more.
Seeking for Perl wisdom...on the process of learning...not there...yet!
In Section
Seekers of Perl Wisdom
|
|