in reply to What does undef do when I say @hashslice{@array} = undef

You skipped perlintro :) you've not identified %unique as a hash

Also, this is interesting :)  [perldoc://unique] unique -> perlfaq4#How can I remove duplicate elements from a list or array?

Use a hash. When you think the words "unique" or "duplicated", think "hash keys".