in reply to outputting xml

Either you have a copy error or you need to use strictures (use strict; use warnings;). You use $xml in the block starting if (($Request->item ("Tab") ... $selected = "CTS")). It is not declared using my so is global and thus concatenates new material (each time the block is processed) onto whatever was left last time.

The outer block labeled SWITCH seems redundant to me as there is no looping construct and the only explicit exit from the block is at the end in any case.


Perl is environmentally friendly - it saves trees