in reply to Checking if a variable is an array

You could do soemthing simple like (ref $var) eq "ARRAY" or something as complicated as Scalar::Util::reftype( $var ) eq "ARRAY". The later is usually only necessary if you're working with blessed scalars.

I'd be surprised if there wasn't some XML::Simple built-in way to determine how to branch though.

-Paul