I am doing so much better. I have one little problem. I have added attributes to my data. I'm using $product->print; below, but I really don't want to print the tags. I tried $product->text but it didn't like it. Thanks again, and this will really get me going for my real data. Patrick =====================xml===================== dev group 1 product 1 product 2 product 3 product 4 dev group 2 product 1 product 2 ===========end of xml================= #!/bin/perl -w use strict; use XML::Twig; my $field= 'group'; my $twig= new XML::Twig; $twig->parsefile( "company.xml"); # build the twig my $root= $twig->root; # get the root of the twig my @group = $root->children; # get the list foreach my $my_group (@group) # the sorted list { print "\nGroup Name: ",$my_group->first_child("name")->text; my $nb_product= $my_group->children( 'product'); print "\nNumber: $nb_product\n"; my $get_att = "platform"; my @products= $my_group->children( 'product'); foreach my $product (@products) { my $plat = $product->att($get_att); # get attribute print "Plat: $plat\n"; if ( "nt" eq $plat ) { print "NT: "; $product->print; # This prints tags } else { print "Unix: "; $product->print; # This prints tags } print "\n"; } }