$th.=$i; # $th is "threads=SCALAR(0x81e2d50)", so you see "threads=SCALAR(0x81e2d50)0"