in reply to Seaching for text in string and comparing to xml, if not found print text
Hack way, regex, proper way, parse the XML.
if ($line =~ m|<ALERT_ID>(\d+)</ALERT_ID>|) { my $alert_id = $1; }
I'll leave the XML solution to you + CPAN + searching...
In Section
Seekers of Perl Wisdom