#!/usr/local/bin/perl my %hash; open (F,"testers.txt"); my @array = ; close(F); foreach (@array) { my ($key, $value) = split(/\|/); next if (exists $hash{$key}); $hash{$key} = $value; } # use this to verify while (my ($fkey,$fval) = each %hash) { print "$fkey|$fval\n"; }