Use double-quotes so $n is interpolated:
$table_hash{"$n,0"} = $m; [download]
In reply to Re: Adding Hash Keys/Values by Kenosis in thread Adding Hash Keys/Values by Anonymous Monk