in reply to how to remove duplicate based on the first column value
You could also do it with substr():
my %seen; print join '', grep { !$seen{substr($_, 0, 1)}++ } <DATA>; [download]