Would below then allow me to check the contents of the hash? while (){ chomp; next unless (/\t/); my ($key, $value ) = split(/\t/, $_, 2); $values{$key}=$value; foreach $key (keys %value) { print OUTPUT "$values {$key}\n"; } }