in reply to Re: Error parsing XML
in thread Error parsing XML

You can use ref to detect the type of thing you have

Yes you can, but in this case it would be better to use XML::Simple's ForceArray option to ensure that the 'Table' elements are always represented as an array. That way you use the same code to process them regardless of whether there's one or many.

More info here.