for my $tu ($dom->findnodes('/tmx/body/tu')) { for my $child ($tu->findnodes('*')) { ( my $text = $child->textContent ) =~ s,\n, ,g; print $text, "\t"; } print "\n"; } __END__ no no Hello world! Bonjour monde yes no no Hello world! Bonjour monde