my $price = 0;
foreach $line(@entry)
{
if($line =~ m/titleA/)
{
$price = 1;
next;
}
if($phone)
{
print "The phone numbers of Family members are:";
print "$line";
$price= 0;
}
}

I need to search for multiple elements from the XML when the title is matched. The above brings back the price but what if I want to search for another element in the xml when the title is matched?

appreciate your help!