my @useless = map { 1 } qw( this is a silly test ); print "@useless\n"; #### my @set1 = qw (apples oranges pears mangoes); my @set2 = qw (bananas mangoes papayas coconuts); my %first_set; @first_set{@set1} = (); my @union = grep { exists $first_set{$_} } @set2;