... now getting the list but it has not removed the duplicates.
...
my @array = $1;
On every iteration through the while-loop, this statement creates a new array and initializes it with a single element: the string that was captured to $1. This string is, of course, unique!
In reply to Re^3: remove duplicates with hash and grep
by AnomalousMonk
in thread remove duplicates with hash and grep
by Smith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |