Sorry still you didn't understand my problem I think, In the above input data as I provided, in that data number tag is same in first data node and third data node, but reaming information is different only number tag is same. I need to delete the entire node if number tag element is same in any node. I am printing $info into new file so before printing into new file I need to eliminate duplicate nodes by using number tag. I hope now you understand clearly, I posted my expected result also. can you suggest me.