if ( ref($xmlin->{$key}) eq "ARRAY") { @anArray = @{$xmlin->{$key}}; } else { push @anArray, $xmlin->{$key}; }