# Create XML reader object my $xs = new XML::Simple(); # Parse XML string my $ref = $xs->XMLin($file_str);