#!/bin/perl -w use strict; use XML::CGI; $q = new XML::CGI; # convert all the form variables to XML $xml = $q->toXML; # this wraps the variables in a single element 'root' $xml = $q->toXML( 'root'); # convert XML to CGI.pm variables $q->toCGI($xml);