XML::Twig
use warnings; use strict; use XML::Twig; my $xml = <<XML; <top> <PrvsNtfctnId><Id>92190602</Id></PrvsNtfctnId> <CorpActnGnlInf> <CorpActnEvtId>12345678</CorpActnEvtId> <OffclCorpActnEvtId>USJJT</OffclCorpActnEvtId> </CorpActnGnlInf> </top> XML my $twig = XML::Twig->new( twig_handlers => { CorpActnEvtId => sub { print $_->text(), "\n" } + } ); $twig->parse($xml); __END__ 12345678

In reply to Re: Strip out value between xml tags by toolic
in thread Strip out value between xml tags by dirtdog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":