in reply to Howto Compare 2 lists

List::Util
and
List::MoreUtils
are your friends
---
my name's not Keith, and I'm not reasonable.

Replies are listed 'Best First'.
Re^2: Howto Compare 2 lists
by reasonablekeith (Deacon) on Sep 14, 2005 at 10:53 UTC
    having said that you could roll your own...
    #!/usr/bin/perl -w use strict; my @a = (1,2,3); my @b = (1,2,3,4,5); my %a_lookup = map {$_,undef} @a; my @c = grep {! exists $a_lookup{$_}} @b; print join(',', @c) . "\n"; # __OUTPUT__ # 4,5
    ---
    my name's not Keith, and I'm not reasonable.