in reply to Re^2: how to capture status codes of mongodb in perl
in thread how to capture status codes of mongodb in perl

What have you tried? Have you tried looking at the documentation, and following the link I posted? If you tried, then try reading this particular fragment again:

last_error returns a hash with fields that vary, depending on what the previous operation was and if it succeeded or failed. If the last operation (before the last_error call) failed, either:
err will be set or
errmsg will be set and ok will be 0.

If err is null and ok is 1, the previous operation succeeded.

- Luke

  • Comment on Re^3: how to capture status codes of mongodb in perl