Don't ask to ask, just ask | |
PerlMonks |
Re^3: Compare array of hashesby Marshall (Canon) |
on Aug 27, 2016 at 21:36 UTC ( [id://1170597]=note: print w/replies, xml ) | Need Help?? |
Congratulations AnishaM++. You current code represents a huge leap forward in understanding! A few nits, @{$$HOAOH1{details}}... Usually the de-referencing operator "->" would be preferred over the double "$$". This code means exactly the same thing and many would find this easier to read: I also had to add quotes around 'AB", 'IJ', etc. in order to make "strict" happy. An assignment that doesn't compile under strict is unusual. use strict; use warnings; will save you a lot of grief in the future. I highly recommend that. The code contains a mixture of tabs and spaces. I think as you write more code, you will find that spaces only are the way to go. My tab isn't the same as your tab, etc. Editors designed for writing programs will have a setting "convert tabs to spaces". That makes everything clear and the extra bytes for the spaces vs a tab is meaningless. Looking at the output, it is hard for me to figure out what records are involved when something matches/doesn't match. pryrt has some suggestions in that regard. I'd re-read the text of the assignment closely to see if there is some clue about what the instructor wants in terms of output format.
In Section
Seekers of Perl Wisdom
|
|