in reply to Re^6: How might one determine empty XML payload?
in thread How might one determine empty XML payload?
Found the problem. The while loop may not have a value populated, and the do has to await new data. Testing that when the payload is empty it terminates with the exit, since last causes an error.
do { if ( $input_xml ) { $dom = XML::LibXML->load_xml( string => $input_xml ); my $isEmpty = !$dom->documentElement->hasChildNodes(); last if $isEmpty; say $fh $input_xml; $offset = $offset + $record_limit; say $offset; } } while ($input_xml = Get_CMDB_CI()); close($fh) || warn "close failed: $!";
|
|---|