shell> perl -le '%a = qw/1 1 2 2 3 3/; %b = qw/2 2 3 3/; \ print grep !$b{$_}, keys %a' 1