On Thu, Jul 10, 2014 at 1:00 AM, Jim Gibson <jimsgib...@gmail.com> wrote:
> > On Jul 9, 2014, at 2:58 PM, Natxo Asenjo wrote: > > On Wed, Jul 9, 2014 at 10:35 PM, Jim Gibson <jimsgib...@gmail.com> > wrote: > > On Jul 9, 2014, at 1:20 PM, Natxo Asenjo wrote: > > In order to use the hash method of determining uniqueness, you must > convert your list values to a scalar value based on the content of the > lists, not the location or identity of the lists as by using the references > to the list. > > The easiest way to do this is to join the elements of the list into a > single string. You need to separate the elements using a character that can > not appear in any of the elements of any list. > > For example, if the ':' character does not appear in any element, you can > do this: > > for my $listref ( @$seen_ref ) { > my $key = join(':',@$listref); > $hash{$key}++; > } > > The keys of %hash will then represent the unique lists. > yes! This is exactly it!. Perfect. Just another question for the icing on the cake. When using the ++ on the $hash{$key}++ how do I get the number of times every list was seen? My apologies for not seeing the obvious here. > It helps a lot if you post a complete, short program that illustrates the > problem you are having. > yes, maybe I should have posted a link to a pastebin service. The problem in this was that there was no small (less than 100 lines) short program because the data from which the AoA gets created in the first place is coming from a largish _DATA_ piece of text - and that is already trimmed to get a representative piece of the real data. You really helped me a lot, thanks! -- Groeten, natxo