Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Remove node information by searching tag element

by MidLifeXis (Monsignor)
on Nov 22, 2011 at 18:00 UTC ( #939507=note: print w/replies, xml ) Need Help??


in reply to remove node information by searching tag element.

This is a FAQ (see the third example). You can find this with perldoc -q unique from your command line.

--MidLifeXis

Replies are listed 'Best First'.
Re^2: Remove node information by searching tag element
by veerubiji (Sexton) on Nov 23, 2011 at 14:06 UTC

    Actually sorry for not providing full information now I edited so please help me with that. I am not storing in a hash.

      The basic process is still the same. You record what you have seen and make processing decisions based on that data.

      doSomething($data) unless $seen{$key}++

      Providing appropriate values for $key, doSomething(), and $data are left as an exercise for the reader.

      Update: Perhaps I am misunderstanding your question. Please post what you expect to see as output given the provided input data.

      --MidLifeXis

        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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939507]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2016-12-05 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (72 votes). Check out past polls.