# Assuming @list_a and @list_b my %b; $b{$_} = 1 foreach (@list_b); my @list_c = grep { not $b{$_} } @list_a;