#!/usr/bin/perl open FH,'istA.xml'; @contents = ; @entites = ("&",""","<"); foreach $con (@contents){ if($con =~ m/\&.*;/){ print $con; } }