http://qs321.pair.com?node_id=910880


in reply to Re^2: Perl sorting unique values
in thread Perl sorting unique values

Almost there:

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;