Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Removing Duplicates in a HoH

by DunLidjun (Acolyte)
on Dec 20, 2010 at 15:42 UTC ( [id://878038]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Removing Duplicates in a HoH
in thread Removing Duplicates in a HoH

I really like this reduction. I previously used the hash to remove duplicate lines like below:

1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 559: partnum=2203505000,description=CONDUCTIVITY CELL,quantity=2.0000, +tags=AE-100 559: partnum=2203505000,description=CONDUCTIVITY CELL,quantity=2.0000, +tags=AE-100 AE-200 559: partnum=2203505000,description=CONDUCTIVITY CELL,quantity=2.0000, +tags=AE-100 AE-200 559: partnum=2203505000,description=CONDUCTIVITY CELL,quantity=2.0000, +tags=AE-100 AE-200 559: partnum=2203505000,description=CONDUCTIVITY CELL,quantity=2.0000, +tags=AE-100 AE-200

Once I loaded this into a hash it reduced to the following:

1: partnum=1003382553-M25,description=CNTFGL PUMP,quantity=1.0000,tags +=PU-200 559: partnum=2203505000,description=CONDUCTIVITY CELL,quantity=2.0000, +tags=AE-100 AE-200

The current modification by scorpio17 adds the duplicates to gether, unfortunately.

Thanks for the help and the insight. I really appreciate it. Shawn Way

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://878038]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2024-03-28 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found