John,

> Hm.  So, I'm sure I can figure this out eventually, but does anyone know
> the right Net::DNS way to extract the TTL?

I don't think it is possible to obtain the original TTL from DNS responses.

The information received in a reply only indicates a remaining time
this information has, before it need be refreshed from a source.
If responses come from a cache of a local name server, the resulting
TTL will get smaller by every call answered from a cache. Try and see!

On a first call:
  $ host -v -t a 2g00d.mobi

one gets 1800 seconds:

;; ANSWER SECTION:
2g00d.mobi.             1800    IN      A       220.112.46.131


half an hour later only few seconds remain:

;; ANSWER SECTION:
2g00d.mobi.             36      IN      A       220.112.46.131

and after expiry, you are up to 1800 s again.

  Mark

Reply via email to