use XML::Simple; my $ref = XMLin([] [, ]); my $xml = XMLout($hashref [, ]); #### my %hash; ... # fill the hash my $xml = XMLout (\%hash);