sub score { my ($x, $y) = @_; return $words_equal if ($x eq $y); my $c = 0; index($y, $_)+1 && $c++ for split //, $x; return $c; }