in reply to Difference between two arrays - is there a better way?
is there another clever way
Another way for sure. Whether it is "clever"?
@list1 = (1, 2, 3, 4, 5); @list2 = (2, 3, 4);; @diff{ @list2 }= ();; print grep !exists($diff{$_}), @list1;; 1 5
|
|---|