in reply to Multiple value tags for xml element using XML::Generator

print $xml_handle->book( map { $xml_handle->value($_) } @values );

Replies are listed 'Best First'.
Re^2: Multiple value tags for xml element using XML::Generator
by matrixmadhan (Beadle) on Nov 26, 2008 at 07:22 UTC
    Many thanks for the reply
    This is what I was looking for.
    I need to revise my basics on map
    thanks again

      map isn't technically needed. It was just convenient.

      my @value_eles; for (@values) { push @value_eles, $xml_handle->value($_); } print $xml_handle->book(@value_eles);
        yes, I get that and map fits more to this use case