use strict; use warnings; my $str="this is abc and bcf and xyz and ijklmn but not abbc"; my @words = split ' ', $str; my @incWords = grep { my %uniq = map {$_ => 0} split ''; $_ eq join '', sort keys %uniq } @words; print "@incWords"; #### is abc bcf xyz ijklmn not