Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: CPAN Module to determing overlap of 2 lists?

by choroba (Cardinal)
on Aug 10, 2020 at 22:20 UTC ( [id://11120567]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120567]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-23 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found