in reply to XML::Simple "Bless" error

perl provides two syntaxes for calling new() (or any other method):

#1) The proper way: my $obj = Class::Name->new(); #Note the arrow followed by the method name.

and:

#2) The way that may work (i.e. the improper way): my $obj = new Class::Name; #Note that the method name comes first and there is no arrow.

Use the proper way.

In no circumstances should you combine the two syntaxes into:

my $obj = new Class::Name->new();