Sub-optimal.
say for do { # <-- mixed paradigms --------
my %seen; # <-- reinventing the wheel |
grep { not $seen{ $_ } ++ } # <---------------------------
+
map { ( split m{;} )[ 1 ] } # too much logic, but that's nitpickin
+g
<$inFH>;
};'
Better? I think so:
use List::Util qw(uniqstr);
say join "\n",
uniqstr
map { $_->[0] }
map { [ split m{;} ] }
<$inFH>;
You could of course roll your own implementation of
uniq if you want to.
holli
You can lead your users to water, but alas, you cannot drown them.