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