In the conditional of lines 24-26, and again in 28-30, you're testing for the presence of a hash key, then populating that level as an array. Your Dumper output confirms that the array treatment wins. You don't push onto a hash, you assign. Since you have an array, the hash key never exists and each $policy seen goes into the array, duplicate or not.
Aside from that, I'm unsure what you're asking.
After Compline,
Zaxo
In reply to Re: Pattern-matching hash keys
by Zaxo
in thread Pattern-matching hash keys
by blink
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |