Hello, I'm working with an Excel sheet that's loaded into an array. I'm trying to remove duplicate rows from the array, based off matches on a specific field within that row. In this example, what I'd refer to as column 3, which is an account number.
Please forgive me, I am a novice at best. I've read a number of posts with some examples, but I'm not following the code because it doesn't seem to look at any specific value. A frequent example of the code suggested is:
@rows = do { my %seen; grep { !$seen{$_}++ } @rows };I don't explicitly understand what's happening in that line, most importantly what it is matching to find a duplicate, but more importantly, it doesn't seem to work on my data.
If anyone has any suggestions, I would like to hear them. I'd also like to understand what the code is doing, rather than just cutting and pasting something. I want to learn, if possible.
In reply to Removing duplicates in multi-dimensional arrays by DamnitAddie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |