$hashref = eval{ XMLin($XMLinaString, forcearray => 1) }; xml_parse_failure($@) if $@; # an error trapping sub