in reply to Checking the layout of a data structure.

So just check if you have a reference or not before trying to use it as such.

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

  • Comment on Re: Checking the layout of a data structure.

Replies are listed 'Best First'.
Re^2: Checking the layout of a data structure.
by kjkjava (Initiate) on Dec 05, 2008 at 21:38 UTC
    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.