Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
"be consistent"
 
PerlMonks  

Re^3: Removing Duplicates in a HoH

by state-o-dis-array (Hermit)
on Dec 20, 2010 at 15:19 UTC ( #878033=note: print w/ replies, xml ) Need Help??


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

Storing the information by part number does what you are looking to accomplish, see the response of scorpio17 which provides an example of what I'm talking about.


Comment on Re^3: Removing Duplicates in a HoH
Re^4: Removing Duplicates in a HoH
by DunLidjun (Novice) on Dec 20, 2010 at 15:42 UTC

    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
Node Status?
node history
Node Type: note [id://878033]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-04-18 22:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (472 votes), past polls