http://www.perlmonks.org?node_id=553526


in reply to Re: Problem handling array from XML stream
in thread Problem handling array from XML stream

And, third, change this:
$one_program_name = $programs->{NAME}->[0];
to this:
$one_program_name = $programs->{NAME};

NAME is an attribute and there can be only one, so it isn't an array reference.

bobf did this, but didn't note it in his response.