in reply to Logic for elimination of duplicate values from an array in perl for windows platform
# The same (obviously working): @a = qw(1 2 3 4 5 4 3 2 1); @b = grep { !$_{$_}++ } @a; print "@b" #1 2 3 4 5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |