in reply to Checking Hash contents

There are some problems with the code here. First, you need to make sure that you are keeping the hash %values separate from the scalar $value. Secondly, I'd move the foreach outside the while or you will be getting quite a lot of repetitive output.
Try this as a quick rewrite.
my %values; while (<INFILE>){ chomp; next unless (/\t/); my ($key, $value ) = split(/\t/, $_, 2); $values{$key}=$value; } foreach my $key (sort keys %values) { print OUTPUT "$key: $values{$key}\n"; }
If you'd rather just log it as the file is read you can get rid of the foreach and move the print statement back inside the while.