if( glob($options{output}) ) { my $xmlFile = glob($options{output}); my $dumperFile = "$xmlFile.dmp"; print "\nINFO: Because of some problems with reading the xml file, a hashdump is also performed\n"; print " Name of the dumped hash is: '$dumperFile'\n"; my $xml = $xs->XMLout($rhDiffResult, KeepRoot=>1, NoAttr=>1, AttrIndent => 1 , KeyAttr=>[]); if(open my $fh, '>', $xmlFile ) { print $fh $xml; } else { warn "WARNING: Could not Open *$xmlFile* ($!)\n"; } if(open my $fh, '>', $dumperFile ) { print $fh Dumper $rhDiffResult; } else { warn "WARNING: Could not Open *$dumperFile* ($!)\n"; } } else { my $xml = $xs->XMLout($rhDiffResult, KeepRoot=>1, NoAttr=>1, AttrIndent => 1, KeyAttr => [] ); #$xs->XMLin( $xmlFile, KeepRoot => 1, NormaliseSpace => 1, ForceContent => 1, ForceArray => 1, KeyAttr => [] ); print $xml; }