rendered paste body#!/usr/bin/perl
my $word;
my @words = qw/relscta pnlkiyof mxieoc blna5oyb rilgbale rteceha rwrorai eeolit swabmtee dramse/;
#chomp(@words=split/\s+/,<STDIN>);
foreach $word (@words)
{
open LIST,"wordlist.txt";
@chars = sort(split//,$word);
while(<LIST>)
{
chomp;
chop;
@wchars = sort(split//);
$a=$#chars+1;
$b=$#wchars+1;
if($a==$b)
{
for($i=0;$i<=$a&&$i!=-1;$i++)
{
$i=-1 unless $chars->[$i] eq $wchars->[$i];
print @chars;
print "\t\t|";
print @wchars;
print "\n";
}
}
}
print "\n";
close LIST;
}