Anagram.pm: Improve readability

master
loganom 2014-07-01 01:45:45 +00:00
parent 63d7dd646e
commit 3e2a7749a6
1 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ handle remainder => sub {
if(/^\s*([a-zA-Z]+)\s*([0-9]+)?\s*$/) {
#convert the word to lowercase
my $word = lc($1);
$in = $word;
$lc_word = $word;
$n = length $word;
$n = $2 if ($2 && $2 <= $n && $2 > 0);
$full_word = 0 if $n != length($word);
@ -74,9 +74,9 @@ handle remainder => sub {
}
# copied verbatim from Randagram.pm
my @chars = split(//, $in);
my @chars = split(//, $lc_word);
@chars = shuffle(@chars);
my $garbledAnswer = '"'.$in.'" scrambled: '.join('',@chars);
my $garbledAnswer = '"'.$lc_word.'" scrambled: '.join('',@chars);
# end Randagram.pm
if($full_word) {