in reply to Re^2: Array of arrays
in thread Array of arrays

It looks complete to me. I would have joined on $; rather than "\0", but that's a difference of little consequence.

How about you try it out, read up on the things that are immediately confusing to you, and try adding comments to the code as you go along? If you end up still stumped by something in these few lines of code, then as us.

The entire "logic" of this code is in these two lines:

my $krow = join "\0", @row; $seen{$krow}++ and next;

Why don't you tell us what that does. If you re-write it like this:

my $row_as_string = join "\0", @row; next if $seen{$row_as_string}++;

Then read it aloud, it should be pretty clear.