All pastes #206002 Raw Edit

revision

public text v1 · immutable
#206002 ·published 2006-10-17 05:10 UTC
rendered paste body
#!/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";