use XML::LibXML::Simple (); use Data::Dumper; my $xs = XML::LibXML::Simple->new(%options); my $XMLRef = $xs->XMLin('new.xml'); print Dumper $XMLRef;