How exactly does it not work? What exactly is in $1? What output do you expect? Are you aware that the code as-is splits on newline characters, which means that "duplicate items" actually mean "duplicate lines"?
If you want to deduplicate a list, I recommend List::MoreUtils::uniq.
In reply to Re: Removal of duplicated element in array.
by moritz
in thread Removal of duplicated element in array.
by tty1x
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |