summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-02-02 05:39:02 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-02-02 05:39:02 -0500
commit65bb08f71b07ea1794e91c351e7959d24387e0a7 (patch)
treeda7cb6fb460e99827debd5a56ed14f01ff7be2b8
parent526ba9c5dea9d95e6ed337a506f5eebf754af9db (diff)
downloadgames-word-65bb08f71b07ea1794e91c351e7959d24387e0a7.tar.gz
games-word-65bb08f71b07ea1794e91c351e7959d24387e0a7.zip
probably name these correctly
-rw-r--r--lib/Games/Word.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Games/Word.pm b/lib/Games/Word.pm
index cd54cdb..514b4e5 100644
--- a/lib/Games/Word.pm
+++ b/lib/Games/Word.pm
@@ -112,11 +112,11 @@ sub random_string_from {
}
sub is_substring {
- my ($word, $substring) = @_;
+ my ($substring, $string) = @_;
return 1 unless $substring;
- my $re = join('?', map { quotemeta } split(//, $substring)) . '?';
- return $word =~ $re;
+ my $re = join('?', map { quotemeta } split(//, $string)) . '?';
+ return $substring =~ $re;
}
sub all_substrings {