for my $para ( $root->children('para') ) { if ( my $get_this= $para->first_child('get_this') ) { print $get_this->att('value'), "\n"; } }