use strict; my %person; map{chomp; $person{$_} = 1} ; print join(",", keys %person); __DATA__ Ruth Samuel Paul John Silas