Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: removing a sublist

by Cristoforo (Deacon)
on Apr 21, 2012 at 15:28 UTC ( #966378=note: print w/ replies, xml ) Need Help??


in reply to removing a sublist

List::Compare will also solve this problem.

#!/usr/bin/perl use strict; use warnings; use 5.014; use List::Compare; my @winners=("ruth","sheila"); my @correct=("ruth","martin","dee","zack"); my $lc = List::Compare->new(\@winners, \@correct); my @composite = $lc->get_Ronly; print "@composite\n";
Prints
dee martin zack

Chris


Comment on Re: removing a sublist
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2015-07-31 08:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls