sub readxml{ $xmlfile = shift; my $twig= new XML::Twig(twig_handlers => { '/kvdt' => \&fall }); $twig->parsefile($xmlfile); } sub fall{ my( $twig, $element)= @_; my @scheine = $element->get_xpath('.//*'); foreach my $schein (@scheine){ my $fk = $schein->name; if ($schein->{att}->{USE}){($schein->{att}->{USE} =~ /EDV/)?(next):();} if ($fk =~ /fk....\b/){ my $key = substr($fk,2,4); $data{xml}{$key}++; } } } #### sub readxml{ $xmlfile = shift; open(XML, $xmlfile); while(){ chomp(); my $line = $_; my @bla; ($line =~ /USE="EDV"/)?(next):(); if ($line =~ /