use strict; use warnings; use XML::Twig; my $file = 'test.xml'; my $tmp; $tmp = XML::Twig->new(); $tmp->parsefile($file); my $root = $tmp->root; foreach my $product ($root->children('para')){ my $para = $product->first_child_text; print "$para\n"; }