in reply to access object values

Your approach is breaking encapsulation rather than using the objects returned. The answer method returns an array of Net::DNS::RR::PTR instances; you should call methods on the instances in that arrayref rather than pulling values out directly (e.g $result->answer->[0]->ptrdname->name (untested, but hopefully gives the right direction)).

The cake is a lie.
The cake is a lie.
The cake is a lie.