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
In reply to Re: Checking if a variable is an array
by jettero
in thread Checking if a variable is an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |