in reply to CPAN Module to determing overlap of 2 lists?

When multiple solutions are possible, which one do you prefer? E.g.
@list1 = qw( a b c d c ); @list2 = qw( c d c x ); # or qw( c d c x );
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: CPAN Module to determing overlap of 2 lists?
by wazat (Monk) on Aug 10, 2020 at 22:42 UTC

    Good point, my problem statement is loose.

    I want the maximum.

    @list1 = qw( a b c d c ); @list2 = qw( c d c x ); # 3