diff options
| -rw-r--r-- | challenge-134/mohammad-anwar/perl/ch-2.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/challenge-134/mohammad-anwar/perl/ch-2.pl b/challenge-134/mohammad-anwar/perl/ch-2.pl index 97f7e20630..66375b4c9a 100644 --- a/challenge-134/mohammad-anwar/perl/ch-2.pl +++ b/challenge-134/mohammad-anwar/perl/ch-2.pl @@ -44,9 +44,10 @@ sub create_table { $line .= '-' for (4 .. length($col)); push @$table, $line; - my %terms; + my %terms = (); + $terms{$_} = 1 for (1 .. $m); + foreach my $i (1 .. $m) { - $terms{$i} = 1; my $row = "$i | $i"; foreach my $j (2 .. $n) { my $k = $i * $j; |
