in reply to Re: Checking the layout of a data structure.
in thread Checking the layout of a data structure.

Hmm, silly question I guess. I just changed if(defined $data->{error}) to if(ref $data) et voilą! I suppose I was assuming "defined" would come into action before the dereferencing arrow. Many thanks.