All pastes #207263 Raw Edit

hmm

public text v1 · immutable
#207263 ·published 2006-10-17 22:18 UTC
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";