revision
public text v1 · immutable#!/usr/bin/perl
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(split//,$word);
$sword = join//,@schars;
open LIST,"wordlist.txt";
while(<LIST>)
{
@whars = split//,$word;
@swchars = sort(split//,$word);
$swword = join//,@swchars;
if($swword=~m/$sword/){print "$_\n";}
}
close LIST;
}
print "\n";