in reply to Re: Removing doubles and printing only unique values
in thread Removing doubles and printing only unique values

I am curious why chose this approach over the functional one by johngg above?

As you can see, it it is significantly shorter, clearer and arguably easier to understand1, once you wrapped your head around the concept.

1If you don't believe me, imagine explaining the iterative approach and the functional approach to a 10 year old.


holli

You can lead your users to water, but alas, you cannot drown them.

Replies are listed 'Best First'.
Re^3: Removing doubles and printing only unique values
by Anonymous Monk on Oct 31, 2017 at 15:18 UTC

    perl -F';' -ane '$seen{$F[1]} //= print'