http://www.perlmonks.org?node_id=919425


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

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.