in reply to to avoid redundacy in a file

Depending on your database setup and how you insert rows, you could also impose a unique key constraint. Failing this, you will want to sort your records and then test for equality. i.e. (warning: untested)
my %hash while(<>){ my $key = join " ", (sort (split " ")); $hash{$key} = 1; } #now iterate over the keys of the hash, and either print them out, or +do your insert in to the database
Mind you that this is feasible for small files, for certain values of small. If your file is large, you may want to just do the join line, write it to another file, and then let a sort -u do your bidding. That assumes that you are on Unix or one of its derivatives (unless there is sort for Windoze... :)

thor