http://qs321.pair.com?node_id=1211178


in reply to Script stopped working...

$content = $ua->request($req); my $data = $xml->XMLin($content);

This is a bug. $content in this context is an HTTP::Response object, not something which can be blindly passed to XMLin() successfully. You first need to extract the XML from it. eg. by using decoded_content. I'd therefore refrain from calling the response $content in the first place.

Try replacing those two lines with:

my $response = $ua->request ($req); my $content = $response->decoded_content; my $data = $xml->XMLin ($content);

That ought to get you a little bit farther along at least.

Replies are listed 'Best First'.
Re^2: Script stopped working...
by gentoobob (Novice) on Mar 18, 2018 at 17:20 UTC

    Yep! Wow. I figured I was missing some kind of decoding which is why I was trying to mess around with Data::Dumper but I couldn't get anywhere with it. This works! Thank you so much. Ive been trying to fix this script for 2 weeks now and putting serious time into. Thank you again.