exercism-perl5

Repository for my Perl 5 Exercism exercises
git clone git://git.samirparikh.com/exercism-perl5
Log | Files | Refs | README

commit 5c6e7d59965eef13788729ec6625809c8662f40e
parent 53f9df8f75e9b8d44488b58d3f773a3ddc53ba5c
Author: Samir Parikh <noreply@samirparikh.com>
Date:   Tue, 17 May 2022 19:27:14 +0000

get all tests to pass

Diffstat:
Metl/ETL.pm | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/etl/ETL.pm b/etl/ETL.pm @@ -6,7 +6,13 @@ our @EXPORT_OK = qw<transform>; sub transform { my ($data) = @_; - return undef; + my %new_score; + + foreach my $score ( keys %{ $data } ) { + $new_score{ lc $_ } = $score foreach ( @{ $data->{ $score } } ); + } + + return \%new_score; } 1;