$origResponse='xmlstring1’; $newResponse='xmlstring2’; use XML::Diff; my $diff = XML::Diff->new(); while(1){ print STDERR "$origResponse\n\n"; print STDERR "$newResponse\n\n"; $diffgram = $diff->compare(-old => $origResponse ,-new => $newResponse ,-asString => 1 ); sleep 5; print STDERR "$diffgram\n"; print STDERR "=======================================================================================================================\n"; }