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


in reply to printing hash values, (don't need the keys)

One problem with your code is that you're reading the entire file into memory when you don't need to. Here's an alternative that doesn't (untested):
my $data_file = "ActiveItems2.txt"; open(DAT, $data_file) || die("Could not open file: $!"); my %seen; while (<DAT>) { chomp; $seen{$_}++; } close(DAT); for (sort keys %seen){ print "$_\n"; }