Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: ignore duplicates and show unique values between 2 text files

by Khen1950fx (Canon)
on Apr 29, 2013 at 17:06 UTC ( #1031260=note: print w/ replies, xml ) Need Help??


in reply to ignore duplicates and show unique values between 2 text files

An easier way is to use List::Compare:

#!/usr/bin/perl -l use strict; use warnings; use List::Compare; my (@Llist) = qw(abc def 121 xyz); my (@Rlist) = qw(def 121); my $lc = List::Compare->new( \@Llist, \@Rlist ); my (@sdiff) = $lc->get_symmetric_difference; foreach my $sdiff(@sdiff) { print $sdiff; }


Comment on Re: ignore duplicates and show unique values between 2 text files
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2015-07-06 04:02 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 (70 votes), past polls