http://www.perlmonks.org?node_id=964197


in reply to Unblessed Reference Error, XMLin

$xml = $xml->XMLin($xmlData);
In each loop, you're replacing the previous value in $xml with new data. That is bound to go wrong the second time you go through the loop body.

Most likely you need to use a different variable.