in reply to Re^2: XML::Twig and handles on regex/xpath
in thread XML::Twig and handles on regex/xpath

Then add the following filter within the sub

return if $_->tag !~ /^tag[123]$/;

Replies are listed 'Best First'.
Re^4: XML::Twig and handles on regex/xpath
by Eythil (Acolyte) on Apr 28, 2011 at 08:25 UTC
    So I can't really handle it within the xpath expression?!

    But your solutions works totally fine, so I guess I will do it this way.
    I thought it might make a performance difference to call the function, but I can be totally wrong with this thought :-).

    Thank you!