#!/usr/bin/perl use strict; # https://www.perlmonks.org/?node_id=11154123 use warnings; use List::AllUtils qw( uniq_by ); open my $fh, '<', \<; print @firstofeachname;