begin code----------------- use MongoDB; use MongoDB::OID; my $conn = MongoDB::Connection->new(); my $db = $conn->test; $db->id->insert({"id1"=>1,"id2"=>2}); end code------------------- #### > "id1" : NumberLong(1),"id2" : NumberLong(2) #### "id1" : 1,"id2":2