in reply to See if arrays match

my %seen; foreach my $item ( @list ) { return error() if ( $seen{$item}++ ); }

UPDATE No - that tells you if the item is in the same list twice. :(
my %seen; $seen{@list} = (1) x @list; foreach my $item ( @list2 ) { return error() if ( $seen{$item} ); }