in reply to removing duplicates from do script

Hello bigip2000,

Try something like this:

I did not test your code as it is incomplete.

my @list = (@lines); $array_element = 0; foreach my $line (@lines) { my @fields = split /,/ $line; if ( $fields[2] eq '1' || $fields[2] eq '0' ) { #@arr1 = do {"@fields[4]\n"}; splice @arr1, arr1[$array_element], 1; } $array_element++; } my @out = uniq @arr1; print "this is @out";

Read more about it here: (How do I completely remove an element from an array?)

Update: I got confused I thought you want to remove the whole line. The correct solution is what 1nickt proposed.

Seeking for Perl wisdom...on the process of learning...not there...yet!