No, {...} constructs a hash reference (which can be assigned to a scalar value, possibly in another hash or even array), not a hash (which is constructed from a LIST ((...)). See perlreftut and perlref for more information on handling references.
You may want to use XML::Writer if you'd like to write information on the fly, without constructing a data structure first.
In reply to Re: Need to use an XML library without dependencies
by aitap
in thread Need to use an XML library without dependencies
by envinyater
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |