about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--day06.pl7
1 files changed, 1 insertions, 6 deletions
diff --git a/day06.pl b/day06.pl
index 218531b..9c94274 100644
--- a/day06.pl
+++ b/day06.pl
@@ -3,12 +3,7 @@ use v5.16;
 
 use File::Slurper 'read_lines';
 
-my %orbits;
-
-for (read_lines("day06")) {
-    my ($in, $out) = split /\)/;
-    $orbits{$out} = $in;
-}
+my %orbits = map { reverse split /\)/ } read_lines("day06");
 
 my $p1 = 0;
 for (keys %orbits) {