#!/usr/bin/perl my $word; my @words = sort(qw/relscta pnlkiyof mxieoc blna5oyb rilgbale rteceha rwrorai eeolit swabmtee dramse/); #chomp(@words=split/\s+/,); foreach $word (@words) { @chars = split//,$word; @schars = sort(split//,$word); $sword = join//,@schars; open LIST,"wordlist.txt"; while() { @whars = split//,$word; @swchars = sort(split//,$word); $swword = join//,@swchars; if($swword=~m/$sword/){print "$_\n";} } close LIST; } print "\n";