in reply to Creating a family of set of integers

With the unique method. @rows holds the rows and $s holds all unique elements from the rows.
#!/usr/bin/perl use Set::Scalar; my @rows; while(<DATA>){ my @q = split ' '; push @rows, Set::Scalar->new(@q); } my $s = Set::Scalar->new->unique(@rows); __DATA__ 1 3 4 5 6 1 6 4 5 3 1 2 4 4 2 1
Boris