diff options
| author | Abigail <abigail@abigail.be> | 2021-11-02 00:53:36 +0100 |
|---|---|---|
| committer | Abigail <abigail@abigail.be> | 2021-11-02 00:53:36 +0100 |
| commit | 699ca8187ca34c2f1d41e40efdf055ba2e76606e (patch) | |
| tree | fb880228eff4ded04ab692a2736fa4dc233aef4d /challenge-137/abigail | |
| parent | fc52f6b569892b44d0f934ae795c199f2b7d3a53 (diff) | |
| download | perlweeklychallenge-club-699ca8187ca34c2f1d41e40efdf055ba2e76606e.tar.gz perlweeklychallenge-club-699ca8187ca34c2f1d41e40efdf055ba2e76606e.tar.bz2 perlweeklychallenge-club-699ca8187ca34c2f1d41e40efdf055ba2e76606e.zip | |
Improve Perl solution
Diffstat (limited to 'challenge-137/abigail')
| -rw-r--r-- | challenge-137/abigail/perl/ch-1.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/challenge-137/abigail/perl/ch-1.pl b/challenge-137/abigail/perl/ch-1.pl index 573fc78007..875aca99a4 100644 --- a/challenge-137/abigail/perl/ch-1.pl +++ b/challenge-137/abigail/perl/ch-1.pl @@ -44,6 +44,7 @@ use experimental 'lexical_subs'; # Guess which method we're using. # +my @start_years = qw [1600 2000] my @long_year_offsets = qw [ 004 009 015 020 026 032 037 043 048 054 @@ -64,4 +65,4 @@ my @long_year_offsets = qw [ ]; say for grep {1900 <= $_ <= 2100} - map {my $fy = $_; map {$_ + $fy} @long_year_offsets} 1600, 2000; + map {my $fy = $_; map {$_ + $fy} @long_year_offsets} @start_years |
