最近用 perl 寫資料到 MongoDB 時,覺得無法預先定義的 data type 有點麻煩,無論怎麼處理,數字總是被存成 NumberLong 更是煩上加煩,然後我找到…

… Perl saves all numbers as 64-bit integers on 64-bit platforms, and NumberLong is how the shell displays 64-bit numbers.

…… there is nothing you can do about it (short of writing your own MongoDB driver)