my @unique; for (@array) { push @unique, $_->[1] unless $unique[$#unique] == $_->[1] }