#!/usr/bin/perl -w use strict; use XML::Simple; my $xml; $xml->{'cgi'} = 'hai'; print XMLout( $xml, keeproot => 1 );