sub unique { my %x; @x{@_} = @_; values %x } #### my @final = map { # Something } unique grep { # Something } map { # Something } @start;