in reply to How to hash without the hash- basic

Not a good solution, but .. are matching allowed?, if yes. It is not cheaper and not more effective, but is pure perl :P :
@array = qw(1 3 4 55 4 3 4 22 1 3 4 3 2 2 3 34); $cad=join (" ",@array); for (@array) { push @uniq, $_ if ($cad !~ /((\A| )($_)( |\Z)).*$_( |\Z)/); } print join (",",@uniq),"\n";