in reply to XML::Simple "Bless" error

This line looks wrong to me:

  $xs = new XML::Simple->new();

I haven't debugged further, but start by fixing that one.