Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: remove entries that match

by Samy_rio (Vicar)
on Jul 12, 2007 at 06:39 UTC ( #626146=note: print w/ replies, xml ) Need Help??


in reply to remove entries that match

Hi, read the two files names in two different arrays and compare the array using List::Compare module. It will give the presence of extra names in both the files as below.

use strict; use warnings; use List::Compare; my @file1 = qw(name1 name2 name3 name4 name5 name6 name7 name8 name9 n +ame10); my @file2 = qw(name1 name2 name3 name4 name5 name6 name7 name8 name9 n +ame10 name11); my $lcma = List::Compare->new(\@file1, \@file2); print $lcma->get_complement; # extra present in file2 print $lcma->get_unique; # extra present in file1

Regards,
Velusamy R.


eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';


Comment on Re: remove entries that match
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2015-07-07 13:39 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 (88 votes), past polls