in reply to regex/perl question about uninitialized value

Isn't '$.' representing text between the <ID> and </ID> tags?
No. Refer to:
perldoc -v '$.'

Also, consider using an XML parser from CPAN, such as XML::Twig, instead of a regex.

  • Comment on Re: regex/perl question about uninitialized value