my @program_array = $XMLref->{Response}->[0]->{Program};
####
my @program_array = @{ $XMLref->{Response}[0]{Program} };
my $program_aref = $XMLref->{Response}[0]{Program};
##
##
if( ref( $XMLref->{Response}[0]{Program}[0] ) ) {
my $program_arrayref = $XMLref->{Response}[0]{Program};
# Walk through the programs
foreach my $programs_href ( @{ $program_arrayref } ) {
my $status_aref = $programs_href->{Status};
my $one_program_name = $programs_href->{NAME};
# Walk through the statuses within each program
foreach my $status_href ( @{ $status_aref } ) {
my $hold_desc = $status_href->{StatusDesc}[0];
my $hold_start = $status_href->{StatusDate}[0];
my $hold_end = $status_href->{StatusEndDate}[0];
# a lot of other processing here
print join( ':', $one_program_name, $hold_desc,
$hold_start, $hold_end ), "\n";
}
}
}
##
##
Balance:nl1 has been published:04/20/05:
Balance:mas has been published:04/20/05:04/26/06
Breathe:nl1 has been published:04/20/05:
Breathe:mas has been published:04/20/05:04/26/06