You give XML::Writer a reference to your variable $results_xml, and it will write its output directly into this variable - you can just say print $results_xml; to see the output. In the code you show, you are attempting to de-reference the variable $results_xml by writing $$results_xml, which isn't possible because $results_xml doesn't contain a reference to another variable, it contains a plain string (your XML). To fix the code you've shown, you could just write: $tempblock = $results_xml; (but without seeing the rest of your code, I'm not sure if you really need to make a copy). See perlreftut and perlref for more information on references.
In reply to Re: Can't use string .. as a SCALAR ref while "strict refs" in use
by Anonymous Monk
in thread Can't use string .. as a SCALAR ref while "strict refs" in use
by toohoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |