diff options
| author | Matthew Neleigh <matthew.neleigh@gmail.com> | 2023-01-22 11:32:01 -0500 |
|---|---|---|
| committer | Matthew Neleigh <matthew.neleigh@gmail.com> | 2023-01-22 11:32:01 -0500 |
| commit | 05fb31725ea6e10959c2c193ce711f6f3228f017 (patch) | |
| tree | a85c5e42480eb644aa787337d4d22ca13e169674 | |
| parent | ac4aa90af41de331a9f7a7884743e1f8c17b4bfa (diff) | |
| download | perlweeklychallenge-club-05fb31725ea6e10959c2c193ce711f6f3228f017.tar.gz perlweeklychallenge-club-05fb31725ea6e10959c2c193ce711f6f3228f017.tar.bz2 perlweeklychallenge-club-05fb31725ea6e10959c2c193ce711f6f3228f017.zip | |
modified: challenge-200/mattneleigh/perl/ch-2.pl
| -rwxr-xr-x | challenge-200/mattneleigh/perl/ch-2.pl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/challenge-200/mattneleigh/perl/ch-2.pl b/challenge-200/mattneleigh/perl/ch-2.pl index c4e5a493c8..d0f15d8992 100755 --- a/challenge-200/mattneleigh/perl/ch-2.pl +++ b/challenge-200/mattneleigh/perl/ch-2.pl @@ -137,7 +137,7 @@ sub digit_to_segments{ # decimal point, but this code doesn't 'light' # that segment- the calling code does, as # needed - my @digit_table = ( + my @segment_table = ( "abcdef", "bc", "abdeg", @@ -160,19 +160,19 @@ sub digit_to_segments{ # Substitute other characters depending on which # segments are supposed to be "lit" substr($text->[0], 5, 3, "---") - if($digit_table[$digit] =~ m/a/); + if($segment_table[$digit] =~ m/a/); substr($text->[1], 7, 1, "/") - if($digit_table[$digit] =~ m/b/); + if($segment_table[$digit] =~ m/b/); substr($text->[3], 5, 1, "/") - if($digit_table[$digit] =~ m/c/); + if($segment_table[$digit] =~ m/c/); substr($text->[4], 1, 3, "---") - if($digit_table[$digit] =~ m/d/); + if($segment_table[$digit] =~ m/d/); substr($text->[3], 1, 1, "/") - if($digit_table[$digit] =~ m/e/); + if($segment_table[$digit] =~ m/e/); substr($text->[1], 3, 1, "/") - if($digit_table[$digit] =~ m/f/); + if($segment_table[$digit] =~ m/f/); substr($text->[2], 3, 3, "---") - if($digit_table[$digit] =~ m/g/); + if($segment_table[$digit] =~ m/g/); return($text); |
