If ever you find yourself thinking "I need to get the unique values of $THING" you should consider using a hash, iterating through the values for $F[2] and incrementing $hash_of_f2{$F[2]} would give you a set of unique values available as keys %hash_of_f2 which you could then sort
use strict;
use warnings;
my %hash;
open my $fh, '<', 'abc.txt' or die $!;
while (<$fh>) {
chomp;
my ($key, $val) = split '\|';
$hash{$val}++;
}
print "$_\n" for sort keys %hash;