http://qs1969.pair.com?node_id=506542


in reply to removing duplicate entries from an array

Yet another way using junctions:
#!/usr/bin/perl use strict; use warnings; use Perl6::Junction qw/one/; use Data::Dumper; my @origin = (1, 2, 3, 2, 3, 4, 1, ); my @unique; for (@origin) { push @unique, $_ unless $_ == one(@unique) } print Dumper \@unique;