in reply to populate hash tab delimited

the scalar $key and $value, as used in your print statement at end of script, are out of scope. you declared them with "my" inside the while loop. so outside the while loop these scalars don't exist; but your hash does as it's a global.
the hardest line to type correctly is: stty erase ^H