qx{cut -d"," -f17 $file | sort | uniq > $tmpfile}; open my $fh1, "<:encoding(utf-8)","$tmpfile" or die "$tmpfile: $!"; while (<$fh1>) { chomp; push @names, split (/\n/); } $fh1->close; #### my @names = qx{cut -d"," -f17 $file | sort | uniq};