use XML::Rules; my @numbers; my $parser = XML::Rules->new( rules => [ '_default' => '', # not interested in most tags 'CS_REFCLT' => sub {push @numbers, $_[1]->{_content}; return}, ], ); $parser->parse($filename);
This way you don't have to worry whether there's just one <CS_REFCLT> on a line or whether there are more, etc.
In reply to Re: Accessing data between two tags
by Jenda
in thread Accessing data between two tags
by ant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |