$VAR1 = {
          'level1' => {
                        'level2' => {
                                        'level3' => {}
                                    }
                      }
        }


The above is the contents of a multi-dimensional hash I have produced from
parsing an XML String.  (The Data::Dumper formatting has been adjusted for
brevity).

What I want to do is check whether level3 is "null" (i.e. contains no value
or sub-hashes), but I can't work out a way of expressing this.

I have the reference to the hash, named $XMLRef, and when printing
something like:

print "$$XMLRef{level1}{level2}{level3}";

I get a HASHREF printed.

How can I evaluate if $$XMLRef{level1}{level2}{level3} is null?

Thanks,

Phil.



_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to