in reply to should I do() this?

One possibility is to call an external program for each XML stream, like this simplified example:

my $remote_program = '/usr/bin/cat'; # set this from the config or pro +gram options for (@output) { # for each xml stream open REMOTE,"|$remote_program" or die "Can't pipe to $remote_progr +am: $!"; print REMOTE $_; # pipe stream to $remote_program close REMOTE; # end }