in reply to parsing complex xml structure with xml::simple
Happily, there is: ref will help you to identify an array reference. You could do something like this:
if (ref($detail->{Col}) eq 'ARRAY') { # do something } else { # do something else }
Update: Hmmph. I get up at 4:40 am and davorg still beat me to this answer, darn those timezone-advantaged monks! Plus, his answer is better. That ForceArray solution looks cool.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: parsing complex xml structure with xml::simple
by bfdi533 (Friar) on Aug 01, 2006 at 15:06 UTC |