in reply to xml confuse

"I do not have much time now - I will try to learn the perl-xml stuff in the near future I hope" is exactly backwards. If you haven't much time now to solve the problem then far and away the best option is to ask for help using something like XML::Twig or possibly XML::TreeBuilder (not XML::Simple btw - it isn't).

For example, consider the following code using XML::TreeBuilder:

use strict; use warnings; use XML::TreeBuilder; my $xmlDoc = <<XML; <doc> ... </doc> XML my $root = XML::TreeBuilder->new (); $root->parse ($xmlDoc); my @authors = $root->look_down (_tag => 'Author'); for my $authorElt (@authors) { my ($lastName) = $authorElt->look_down (_tag => 'LastName'); my ($foreName) = $authorElt->look_down (_tag => 'ForeName'); next unless defined $lastName and defined $foreName; print $lastName->as_text (), ', ', $foreName->as_text (), "\n"; }

with the ... replaced by your sample XML prints (assuming the spurious </Article> is removed):

van Beilen, J B Penninga, D Witholt, B Wilde, A Reaves, B Banting, G

Perl is environmentally friendly - it saves trees